/* ===========================================================
   UECT 2026 — Article standard (com_content.article, hors home et hors SE)
   Conforme charte v3 + maquette UECT-page-article.
   Chargé sur .is-std-article.
   =========================================================== */

.uect-body.is-std-article .uect-main { padding: 0; }

.uect-article { display: block; }

/* --- Bandeau bleu titre --- */
.uect-article__hero {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: var(--uect-blue);
	color: var(--uect-white);
	padding: 28px 0 30px;
	box-sizing: border-box;
}
.uect-article__hero-inner {
	max-width: var(--uect-container);
	margin: 0 auto;
	padding: 0 var(--uect-gutter-x);
	display: flex;
	flex-direction: column;
	gap: 22px;
	box-sizing: border-box;
}

.uect-article__crumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 15px;
	color: rgba(255,255,255,.7);
}
.uect-article__crumbs a {
	color: var(--uect-white);
	font-weight: 600;
	text-decoration: none;
}
.uect-article__crumbs a:hover { text-decoration: underline; }
.uect-article__crumbs-current {
	font-weight: 600;
	color: var(--uect-yellow);
}

.uect-article__title {
	margin: 0;
	font-family: var(--uect-font-cond);
	font-weight: 700;
	font-size: clamp(48px, 8vw, 104px);
	line-height: .9;
	letter-spacing: -.005em;
	color: var(--uect-white);
	text-transform: uppercase;
}

/* --- Corps 820px colonne unique --- */
.uect-article__body {
	background: var(--uect-white);
	padding: 52px 0 80px;
}
.uect-article__body-inner {
	/* Colonne de lecture 820 px + gutters latéraux ; charte v3. */
	max-width: calc(820px + (var(--uect-gutter-x) * 2));
	margin: 0 auto;
	padding: 0 var(--uect-gutter-x);
	box-sizing: border-box;
}

/* --- Chapô : premier paragraphe stylé automatiquement --- */
.uect-article__body-inner > p:first-of-type {
	margin: 0 0 6px;
	font-family: var(--uect-font-sans);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.55;
	color: var(--uect-ink);
	text-wrap: pretty;
}

/* --- Paragraphe courant --- */
.uect-article__body-inner p {
	margin: 0 0 20px;
	font-family: var(--uect-font-sans);
	font-size: 17.5px;
	line-height: 1.72;
	color: #333D4F;
	text-wrap: pretty;
}

/* --- Hiérarchie titres --- */
.uect-article__body-inner h2 {
	margin: 32px 0 12px;
	font-family: var(--uect-font-sans);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--uect-ink);
}

.uect-article__body-inner h3 {
	position: relative;
	margin: 32px 0 8px;
	padding-left: 48px;
	font-family: var(--uect-font-cond);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	line-height: 1.05;
	color: var(--uect-blue);
}
.uect-article__body-inner h3::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 34px;
	height: 4px;
	background: var(--uect-yellow);
	transform: translateY(-50%);
}

.uect-article__body-inner h4 {
	margin: 22px 0 4px;
	font-family: var(--uect-font-sans);
	font-size: 21px;
	font-weight: 700;
	color: var(--uect-ink);
}

/* --- Liens dans le corps --- */
.uect-article__body-inner a {
	color: var(--uect-blue);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(41,88,166,.4);
	transition: border-color .18s ease;
}
.uect-article__body-inner a:hover {
	border-bottom-color: var(--uect-blue);
}

/* Lien enveloppant une image : ni soulignage, ni flèche ↓ */
.uect-article__body-inner a:has(> img),
.uect-article__body-inner a:has(> img):hover {
	border-bottom: 0;
	display: inline-block;
}
.uect-article__body-inner a:has(> img)::before { content: none; }

/* Lien vers un fichier → flèche ↓ automatique (sauf image).
   Extensions couvertes : documents (pdf/doc/docx/odt/txt/csv),
   tableurs (xls/xlsx/ods), présentations (ppt/pptx/odp),
   archives (zip/rar/7z/gz/tar/tgz), parcours (gpx/kml/kmz),
   médias (mp3/mp4/wav/mov/avi). */
.uect-article__body-inner a[href$=".pdf" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".doc" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".docx" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".odt" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".txt" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".csv" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".xls" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".xlsx" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".ods" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".ppt" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".pptx" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".odp" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".zip" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".rar" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".7z" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".gz" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".tar" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".tgz" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".gpx" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".kml" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".kmz" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".mp3" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".mp4" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".wav" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".mov" i]:not(:has(> img)),
.uect-article__body-inner a[href$=".avi" i]:not(:has(> img)) {
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
}
.uect-article__body-inner a[href$=".pdf" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".doc" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".docx" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".odt" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".txt" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".csv" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".xls" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".xlsx" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".ods" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".ppt" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".pptx" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".odp" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".zip" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".rar" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".7z" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".gz" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".tar" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".tgz" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".gpx" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".kml" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".kmz" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".mp3" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".mp4" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".wav" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".mov" i]:not(:has(> img))::before,
.uect-article__body-inner a[href$=".avi" i]:not(:has(> img))::before {
	content: "↓";
	flex: none;
	font-size: 18px;
	font-weight: 900;
	line-height: 1;
	color: var(--uect-blue);
	-webkit-text-stroke: 1px var(--uect-blue);
}

/* --- Mise en valeur inline --- */
.uect-article__body-inner strong { color: var(--uect-ink); }

/* --- Listes à puces (carré jaune 9px) --- */
.uect-article__body-inner ul {
	margin: 8px 0 20px;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.uect-article__body-inner ul li {
	position: relative;
	padding-left: 34px;
	font-family: var(--uect-font-sans);
	font-size: 17.5px;
	line-height: 1.6;
	color: #333D4F;
}
.uect-article__body-inner ul li::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 12px;
	width: 9px;
	height: 9px;
	background: var(--uect-yellow);
}
/* Deuxième niveau : carré bleu, retrait 44px */
.uect-article__body-inner ul ul {
	margin: 8px 0 4px;
	padding-left: 24px;
}
.uect-article__body-inner ul ul li { padding-left: 34px; }
.uect-article__body-inner ul ul li::before {
	background: var(--uect-blue);
}

/* --- Liste ordonnée --- */
.uect-article__body-inner ol {
	margin: 8px 0 20px;
	padding-left: 22px;
}
.uect-article__body-inner ol li {
	font-family: var(--uect-font-sans);
	font-size: 17.5px;
	line-height: 1.6;
	color: #333D4F;
	margin: 6px 0;
}

/* --- Blockquote / encadré info --- */
.uect-article__body-inner blockquote {
	margin: 24px 0;
	padding: 22px 26px;
	background: #EFF3F8;
	border-left: 3px solid var(--uect-blue);
	color: #333D4F;
	font-size: 17px;
	line-height: 1.68;
}
.uect-article__body-inner blockquote p {
	margin: 0;
	font-size: 17px;
	line-height: 1.68;
}

/* --- Figure / images --- */
.uect-article__body-inner figure {
	margin: 24px 0 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.uect-article__body-inner figure img {
	max-width: 100%;
	height: auto;
	display: block;
}
.uect-article__body-inner figcaption {
	font-size: 14.5px;
	line-height: 1.45;
	color: #4A5468;
}
.uect-article__body-inner img {
	max-width: 100%;
	height: auto;
}

/* Paragraphe contenant plusieurs images → galerie horizontale qui s'enroule.
   L'alignement répond à l'attribut `style="text-align:…"` posé par le WYSIWYG
   via les boutons « Aligner à gauche / centre / droite / justifier ». */
.uect-article__body-inner p:has(> img + img) {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-start;
	justify-content: flex-start;
}
.uect-article__body-inner p:has(> img + img)[style*="text-align:center"],
.uect-article__body-inner p:has(> img + img)[style*="text-align: center"] {
	justify-content: center;
}
.uect-article__body-inner p:has(> img + img)[style*="text-align:right"],
.uect-article__body-inner p:has(> img + img)[style*="text-align: right"] {
	justify-content: flex-end;
}
.uect-article__body-inner p:has(> img + img)[style*="text-align:justify"],
.uect-article__body-inner p:has(> img + img)[style*="text-align: justify"] {
	justify-content: space-between;
}
.uect-article__body-inner p:has(> img + img) img {
	flex: 0 0 auto;
	max-width: 100%;
	height: auto;
	/* Neutraliser les styles inline posés par TinyMCE au moment du centrage,
	   sinon chaque image prend margin:auto et passe à la ligne. */
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* --- Bouton CTA jaune (classes .btn / .uect-btn) --- */
.uect-article__body-inner .btn,
.uect-article__body-inner a.btn,
.uect-article__body-inner .uect-btn,
.uect-article__body-inner a.uect-btn {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0 6px;
	background: var(--uect-yellow);
	color: var(--uect-ink);
	font-family: var(--uect-font-sans);
	font-size: 18px;
	font-weight: 700;
	padding: 18px 34px;
	border: 0;
	border-bottom: 0;
	text-decoration: none;
	transition: background .18s ease;
}
.uect-article__body-inner .btn:hover,
.uect-article__body-inner .uect-btn:hover {
	background: #E8AB05;
	border-bottom: 0;
}

/* --- Encart discret : fond clair + filets bleus haut/bas (classe .uect-note) --- */
.uect-article__body-inner .uect-note {
	background: #EFF3F8;
	border-top: 1px solid var(--uect-blue);
	border-bottom: 1px solid var(--uect-blue);
	padding: 26px 32px;
	margin: 22px 0;
	color: #333D4F;
	font-size: 17px;
	line-height: 1.7;
}
.uect-article__body-inner .uect-note > *:first-child { margin-top: 0; }
.uect-article__body-inner .uect-note > *:last-child { margin-bottom: 0; }
.uect-article__body-inner .uect-note p { margin: 0 0 10px; font-size: 17px; line-height: 1.7; }
.uect-article__body-inner .uect-note p:last-child { margin-bottom: 0; }

/* --- Encart bleu (classe .uect-note-blue) --- */
.uect-article__body-inner .uect-note-blue {
	background: var(--uect-blue);
	color: var(--uect-white);
	padding: 28px 32px;
	margin: 22px 0;
	border-left: 0;
}
.uect-article__body-inner .uect-note-blue > *:first-child { margin-top: 0; }
.uect-article__body-inner .uect-note-blue > *:last-child { margin-bottom: 0; }
.uect-article__body-inner .uect-note-blue h2,
.uect-article__body-inner .uect-note-blue h3,
.uect-article__body-inner .uect-note-blue h4,
.uect-article__body-inner .uect-note-blue p,
.uect-article__body-inner .uect-note-blue li,
.uect-article__body-inner .uect-note-blue strong { color: var(--uect-white); }
.uect-article__body-inner .uect-note-blue a {
	color: var(--uect-yellow);
	font-weight: 700;
	border-bottom-color: rgba(242,183,5,.4);
}
.uect-article__body-inner .uect-note-blue a:hover { border-bottom-color: var(--uect-yellow); }
.uect-article__body-inner .uect-note-blue ul li::before { background: var(--uect-yellow); }
.uect-article__body-inner .uect-note-blue em { font-style: normal; color: rgba(255,255,255,.75); font-size: 15.5px; }

/* --- Bloc code source (documentation charte) --- */
.uect-article__body-inner pre {
	background: #0E1E33;
	color: #FFFFFF;
	padding: 18px 22px;
	margin: 8px 0 24px;
	border-radius: 0;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 14px;
	line-height: 1.55;
	overflow-x: auto;
	white-space: pre;
}
.uect-article__body-inner pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
}
.uect-article__body-inner code {
	background: #EFF3F8;
	color: var(--uect-blue-dark);
	padding: 2px 6px;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 15px;
	border-radius: 3px;
}

/* --- Tableaux : filets bleu clair, entête sur fond gris bleuté --- */
.uect-article__body-inner table {
	width: 100%;
	max-width: 100%;
	margin: 20px 0 24px;
	border-collapse: collapse;
	font-size: 16.5px;
	line-height: 1.55;
	color: #333D4F;
}
.uect-article__body-inner table th,
.uect-article__body-inner table td {
	padding: 12px 14px;
	border: 1px solid #DFE5EE;
	text-align: left;
	vertical-align: top;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
}
.uect-article__body-inner table thead th,
.uect-article__body-inner table th:first-child {
	background: #EFF3F8;
	color: var(--uect-ink);
	font-weight: 700;
}
.uect-article__body-inner table tbody tr:nth-child(even) { background: #F8FAFC; }

/* --- Date de modification --- */
.uect-article__modified {
	margin-top: 40px;
	padding-top: 18px;
	border-top: 1px solid #DFE5EE;
	font-size: 14px;
	color: #4A5468;
}

/* --- Responsive tablet --- */
@media (min-width: 641px) and (max-width: 1024px) {
	.uect-article__title { font-size: clamp(46px, 8vw, 88px); }
	.uect-article__body { padding: 40px 0 60px; }
}

/* --- Responsive mobile --- */
@media (max-width: 640px) {
	.uect-article__hero { padding: 22px 0 24px; }
	.uect-article__title { font-size: 52px; }
	.uect-article__body { padding: 32px 0 48px; }
	.uect-article__body-inner > p:first-of-type { font-size: 19px; }
	.uect-article__body-inner p,
	.uect-article__body-inner ul li,
	.uect-article__body-inner ol li { font-size: 17px; }
	.uect-article__body-inner h2 { font-size: 26px; }
	.uect-article__body-inner h3 { font-size: 28px; padding-left: 40px; }
	.uect-article__body-inner h3::before { width: 28px; }
	.uect-article__body-inner h4 { font-size: 19px; }
	.uect-article__body-inner .btn { font-size: 16px; padding: 14px 24px; }

	/* Tableaux : chaque ligne devient une carte empilée verticalement.
	   La 1re cellule sert d'entête de la carte, les suivantes s'empilent en-dessous.
	   Chaque td porte son data-label (injecté par responsive-tables.js) pour
	   indiquer le titre de colonne au-dessus de sa valeur. */
	.uect-article__body-inner table,
	.uect-article__body-inner table tbody,
	.uect-article__body-inner table thead,
	.uect-article__body-inner table tr,
	.uect-article__body-inner table th,
	.uect-article__body-inner table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.uect-article__body-inner table { margin: 16px 0 20px; }
	.uect-article__body-inner table thead { display: none; }
	.uect-article__body-inner table tr {
		margin-bottom: 14px;
		border: 1px solid #DFE5EE;
		background: transparent;
	}
	.uect-article__body-inner table tbody tr:nth-child(even) { background: transparent; }
	.uect-article__body-inner table td,
	.uect-article__body-inner table th {
		border: 0;
		border-bottom: 1px solid #DFE5EE;
		padding: 10px 14px;
		font-size: 15.5px;
	}
	.uect-article__body-inner table tr td:last-child,
	.uect-article__body-inner table tr th:last-child { border-bottom: 0; }
	.uect-article__body-inner table tr td:first-child,
	.uect-article__body-inner table tr th:first-child {
		background: #EFF3F8;
		color: var(--uect-ink);
		font-weight: 700;
	}
	/* Label (titre de colonne) injecté par JS, affiché au-dessus de la valeur */
	.uect-article__body-inner table td[data-label]:not(:first-child)::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: .04em;
		text-transform: uppercase;
		color: var(--uect-blue);
		opacity: .85;
	}
	/* Si le thead contient un seul th en colspan = titre de section fusionné
	   (marqué par .has-section-header via responsive-tables.js). On réaffiche
	   le thead comme un bloc d'entête visible au-dessus des cartes. */
	.uect-article__body-inner table.has-section-header thead { display: block; }
	.uect-article__body-inner table.has-section-header thead tr,
	.uect-article__body-inner table.has-section-header thead th {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.uect-article__body-inner table.has-section-header thead th {
		background: #EFF3F8;
		color: var(--uect-ink);
		font-weight: 700;
		padding: 12px 14px;
		border: 1px solid #DFE5EE;
		border-bottom: 0;
		margin: 0;
		text-align: left;
		font-size: 15px;
	}
}
