/**
 * Utilitaires : blocs à fond blanc et texte noir.
 *
 * Usage (éditeur Gutenberg) :
 * - Réglages du bloc → Avancé → Classes CSS additionnelles.
 *
 * | Classe              | Usage                                              |
 * |---------------------|----------------------------------------------------|
 * | flash-bloc-texte    | Paragraphe, groupe, colonne — bloc de texte courant |
 * | flash-bloc-blanc    | Lien / carte cliquable, listes de cours            |
 *
 * Exemple liste (cartes) :
 * <ul class="flash-blocs-grille">
 *   <li><a class="flash-bloc-blanc" href="...">Nom du cours</a></li>
 * </ul>
 */

/* ── Bloc de texte (fond blanc, texte noir) ─────────────────────────────── */

.flash-bloc-texte {
	box-sizing: border-box;
	display: block;
	width: 100%;
	padding: 1.25rem 1.5rem;
	margin: 1rem 0;
	background: #ffffff !important;
	color: #0e0e0e !important;
	border: 1px solid rgba(14, 14, 14, 0.1);
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.6;
}

.flash-bloc-texte :is(p, li, span, strong, b, em, i, blockquote, figcaption, td, th) {
	color: #0e0e0e !important;
}

.flash-bloc-texte :is(h1, h2, h3, h4, h5, h6) {
	color: #0e0e0e !important;
}

.flash-bloc-texte :is(strong, b) {
	font-weight: 800 !important;
	color: #000000 !important;
	-webkit-font-smoothing: antialiased;
}

.flash-bloc-texte a {
	color: #0e0e0e !important;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.flash-bloc-texte a:hover,
.flash-bloc-texte a:focus-visible {
	color: #3f3f3f !important;
}

/* Groupe / colonne : le conteneur porte la classe */
.wp-block-group.flash-bloc-texte > .wp-block-group__inner-container,
.wp-block-column.flash-bloc-texte > .wp-block-column__inner-container {
	width: 100%;
}

/* Pages sombres Studio : prime sur la prose claire */
:is(html.flash-studio, body.flash-singular-studio) .flash-entry-prose .flash-bloc-texte,
:is(html.flash-studio, body.flash-singular-studio) #flash-entry-prose .flash-bloc-texte,
:is(html.flash-studio, body.flash-singular-studio) .entry-content-block .flash-bloc-texte {
	background: #ffffff !important;
	color: #0e0e0e !important;
}

:is(html.flash-studio, body.flash-singular-studio) .flash-entry-prose .flash-bloc-texte :is(p, li, a, h1, h2, h3, h4, h5, h6),
:is(html.flash-studio, body.flash-singular-studio) #flash-entry-prose .flash-bloc-texte :is(p, li, a, h1, h2, h3, h4, h5, h6) {
	color: #0e0e0e !important;
}

:is(html.flash-studio, body.flash-singular-studio) .flash-entry-prose .flash-bloc-texte :is(strong, b),
:is(html.flash-studio, body.flash-singular-studio) #flash-entry-prose .flash-bloc-texte :is(strong, b),
:is(html.flash-studio, body.flash-singular-studio) .flash-internal-page #flash-entry-prose .flash-bloc-texte :is(strong, b),
:is(html.flash-studio, body.flash-singular-studio) .entry-content-block .flash-bloc-texte :is(strong, b) {
	font-weight: 800 !important;
	color: #000000 !important;
}

/* Aperçu dans l’éditeur Gutenberg */
.editor-styles-wrapper .flash-bloc-texte {
	background: #ffffff !important;
	color: #0e0e0e !important;
	border: 1px solid rgba(14, 14, 14, 0.1);
}

.editor-styles-wrapper .flash-bloc-texte :is(p, li, a, h1, h2, h3, h4, h5, h6, span) {
	color: #0e0e0e !important;
}

.editor-styles-wrapper .flash-bloc-texte :is(strong, b) {
	font-weight: 800 !important;
	color: #000000 !important;
}

/* ── Carte / lien blanc (flash-bloc-blanc) ────────────────────────────────── */

.flash-bloc-blanc {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 1rem 1.25rem;
	margin: 0;
	background: #ffffff !important;
	color: #0e0e0e !important;
	border: 1px solid rgba(14, 14, 14, 0.12);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.35;
	text-decoration: none !important;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.flash-bloc-blanc,
.flash-bloc-blanc a {
	cursor: pointer;
}

a.flash-bloc-blanc:hover,
a.flash-bloc-blanc:focus-visible,
.flash-bloc-blanc a:hover,
.flash-bloc-blanc a:focus-visible {
	background: #f5f5f5 !important;
	color: #0e0e0e !important;
	border-color: rgba(14, 14, 14, 0.25) !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* Gras / texte à l’intérieur du bloc */
.flash-bloc-blanc :is(strong, b, span, p) {
	color: inherit !important;
}

/* Conteneur optionnel : plusieurs blocs en grille */
.flash-blocs-grille {
	list-style: none !important;
	margin: 1.25rem 0 !important;
	padding: 0 !important;
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	align-items: stretch;
}

@media (min-width: 560px) {
	.flash-blocs-grille {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.flash-blocs-grille {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.flash-blocs-grille > li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

/* Grille programme : cartes de même hauteur (par ligne) */
.flash-programme-bloc-item,
.flash-blocs-grille > li {
	display: flex;
	min-height: 0;
}

.flash-bloc-blanc--uniform,
.flash-programme-bloc-item > .flash-bloc-blanc,
.flash-blocs-grille > li > .flash-bloc-blanc {
	flex: 1 1 auto;
	width: 100%;
	min-height: 5.5rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.2rem;
	box-sizing: border-box;
}

.flash-bloc-blanc__label {
	display: block;
	line-height: 1.3;
	font-weight: 600;
}

.flash-bloc-blanc__meta {
	display: block;
	font-size: 0.95em;
	font-weight: 500;
	line-height: 1.25;
	opacity: 0.9;
}
