/* =========================================================
   UJA ESSENTIEL — Styles des blocs de la page d'accueil
   ========================================================= */

/* Espacement entre les grandes sections */
.uja-section {
	margin-block-start: 56px !important;
}

/* ---------- Message d'information ---------- */

.wp-block-group.is-style-alerte {
	position: relative;
	padding: 28px 32px 28px 92px;
	background: #dbe5f7;
	border-radius: 12px;
}

.wp-block-group.is-style-alerte::before {
	content: "";
	position: absolute;
	top: 30px;
	left: 36px;
	width: 36px;
	height: 36px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23315fc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='11' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7.5' r='.6' fill='%23315fc4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-group.is-style-alerte > * {
	margin-block: 0;
}

.wp-block-group.is-style-alerte h1,
.wp-block-group.is-style-alerte h2 {
	margin: 0 0 8px;
	color: #315fc4;
	font-size: calc(1.275rem + .3vw);
	line-height: 1.2;
}

.wp-block-group.is-style-alerte p {
	max-width: 70ch;
	color: var(--wp--preset--color--contrast, #212529);
}

/* ---------- Titres de section ---------- */

.uja-section > h2.wp-block-heading {
	margin: 0 0 22px;
	font-size: 1.35rem;
}

.uja-titre-section {
	margin-bottom: 22px;
}

.uja-titre-section h2 {
	margin: 0;
	font-size: 1.35rem;
}

.uja-lien-tous {
	margin: 0;
	font-size: .9rem;
	font-weight: 500;
}

.uja-lien-tous a {
	text-decoration: none;
}

.uja-lien-tous a:hover {
	text-decoration: underline;
}

/* ---------- Grille de tuiles ---------- */

.wp-block-group.uja-grille {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 20px !important;
}

@media (max-width: 1000px) {
	.wp-block-group.uja-grille { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 520px) {
	.wp-block-group.uja-grille { grid-template-columns: 1fr !important; }
}

/* ---------- Tuiles ---------- */

.wp-block-group.is-style-tuile,
.wp-block-group.is-style-tuile-tarif {
	display: flex;
	flex-direction: column;
	min-height: 270px;
	padding: 24px;
	background: var(--wp--preset--color--base, #fff);
	border-radius: 12px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}

@media (max-width: 520px) {
	.wp-block-group.is-style-tuile,
	.wp-block-group.is-style-tuile-tarif { min-height: 0; }
}

.wp-block-group.is-style-tuile > *,
.wp-block-group.is-style-tuile-tarif > * {
	margin-block: 0;
}

/* Icône dans un rond, en haut de la tuile. Classe « uja-icone-… » au choix. */
.wp-block-group.is-style-tuile::before,
.wp-block-group.is-style-tuile-tarif::before {
	content: "";
	flex: none;
	width: 52px;
	height: 52px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: #f2f3f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.wp-block-group.is-style-tuile.uja-icone-document::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-contrat::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-guide::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5l-2 5-5 2 2-5z'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-doctrine::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5a2 2 0 0 1 2-2h13v15H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19a2 2 0 0 0 2 2h13v-3'/%3E%3Cpath d='M9 7h6'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-euro::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.5A6.5 6.5 0 1 0 17 17.5'/%3E%3Cpath d='M4 10h9M4 14h9'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-calendrier::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile.uja-icone-lien::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }

.wp-block-group.is-style-tuile h3,
.wp-block-group.is-style-tuile-tarif h3 {
	margin-bottom: 6px;
	color: var(--wp--preset--color--accent-1, #0071ff);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.wp-block-group.is-style-tuile p {
	color: var(--wp--preset--color--accent-4, #6c757d);
	font-size: .85rem;
}

.wp-block-group.is-style-tuile .wp-block-buttons {
	margin-top: auto;
	padding-top: 16px;
}

.wp-block-group.is-style-tuile .uja-format {
	margin-top: 8px;
	color: #9aa0a6;
	font-size: .75rem;
}

/* ---------- Tuile bleue (tarif) ---------- */

.wp-block-group.is-style-tuile-tarif {
	background: var(--wp--preset--color--accent-1, #0071ff);
	color: #fff;
}

.wp-block-group.is-style-tuile-tarif::before {
	background-color: rgba(255, 255, 255, .18);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.5A6.5 6.5 0 1 0 17 17.5'/%3E%3Cpath d='M4 10h9M4 14h9'/%3E%3C/svg%3E");
}
.wp-block-group.is-style-tuile-tarif.uja-icone-document::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-contrat::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-guide::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5l-2 5-5 2 2-5z'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-doctrine::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5a2 2 0 0 1 2-2h13v15H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19a2 2 0 0 0 2 2h13v-3'/%3E%3Cpath d='M9 7h6'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-euro::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.5A6.5 6.5 0 1 0 17 17.5'/%3E%3Cpath d='M4 10h9M4 14h9'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-calendrier::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.wp-block-group.is-style-tuile-tarif.uja-icone-lien::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }

.wp-block-group.is-style-tuile-tarif h3,
.wp-block-group.is-style-tuile-tarif p,
.wp-block-group.is-style-tuile-tarif a {
	color: #fff;
}

.wp-block-group.is-style-tuile-tarif .uja-tarif-sous {
	margin-bottom: 10px;
	color: rgba(255, 255, 255, .8);
	font-size: .8rem;
}

.wp-block-group.is-style-tuile-tarif ul {
	margin-top: auto;
	padding: 0;
	list-style: none;
}

.wp-block-group.is-style-tuile-tarif li {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 5px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .22);
	font-size: .85rem;
}

.wp-block-group.is-style-tuile-tarif li:last-child {
	border-bottom: 0;
}

.wp-block-group.is-style-tuile-tarif li strong {
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- Bouton « Télécharger » ---------- */

.wp-block-button.is-style-telecharger .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: var(--wp--preset--color--accent-1, #0071ff);
	color: #fff;
	font-size: .875rem;
	font-weight: 500;
}

.wp-block-button.is-style-telecharger .wp-block-button__link:hover {
	background: var(--wp--preset--color--bleu-fonce, #005fd4);
	color: #fff;
}

.wp-block-button.is-style-telecharger .wp-block-button__link::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
	.wp-block-group.is-style-alerte { padding: 72px 22px 22px; }
	.wp-block-group.is-style-alerte::before { top: 22px; left: 22px; width: 30px; height: 30px; }
}
