/* =========================================================
   Les Deux Comtés — styles complémentaires à theme.json
   ========================================================= */

/* ---------- En-tête collant ---------- */
header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}
.dc-entete .wp-block-navigation a:hover,
.dc-entete .wp-block-navigation a:focus {
	color: var(--wp--preset--color--or);
}
.dc-entete .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--violet) !important;
	border: 1px solid rgba(255, 209, 102, 0.35) !important;
	border-radius: 12px;
	padding: 6px 0;
}
.dc-entete .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--violet) !important;
	color: #fff !important;
}
.dc-entete .wp-block-navigation__responsive-container-open,
.dc-entete .wp-block-navigation__responsive-container-close {
	color: #fff;
}

/* ---------- Pied de page ---------- */
.dc-pied a {
	text-decoration: none;
}
.dc-pied a:hover,
.dc-pied a:focus {
	text-decoration: underline;
}

/* ---------- Boutons ---------- */
.wp-block-button__link {
	transition: transform 0.25s ease, background-color 0.25s ease;
}
.wp-block-button__link:hover {
	transform: scale(1.05);
}
.wp-block-button.is-style-petit .wp-block-button__link {
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
}
.wp-block-button.is-style-inactif .wp-block-button__link {
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
	background: #cfcfcf;
	color: #555;
	box-shadow: none;
	pointer-events: none;
}

/* ---------- Surfaces claires : parchemin, cartes, royaumes ---------- */
.is-style-parchemin,
.is-style-carte-age,
[class*="is-style-royaume-"] {
	color: var(--wp--preset--color--encre);
	border-radius: 28px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.is-style-parchemin {
	background-color: var(--wp--preset--color--parchemin);
}
.is-style-carte-age {
	background-color: #fff;
	transition: transform 0.3s ease;
}
.is-style-carte-age:hover {
	transform: translateY(-8px);
}
.is-style-parchemin :where(h1, h2, h3, h4),
[class*="is-style-royaume-"] :where(h1, h2, h3, h4) {
	color: var(--wp--preset--color--cuivre);
}
.is-style-carte-age :where(h2, h3) {
	color: var(--wp--preset--color--corail);
}
.is-style-parchemin a:where(:not(.wp-element-button)),
.is-style-carte-age a:where(:not(.wp-element-button)),
[class*="is-style-royaume-"] a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--encre);
}

/* Couleurs des royaumes */
.is-style-royaume-fins       { background-color: #fff6dc; border: 3px solid #d4af37; }
.is-style-royaume-fees       { background-color: #f1fff0; border: 3px solid #7bcf8a; }
.is-style-royaume-temps      { background-color: #eee9ff; border: 3px solid #9b8ad6; }
.is-style-royaume-pont       { background-color: #e8f5f8; border: 3px solid #5fa8b8; }
.is-style-royaume-sorcieres  { background-color: #efe1f5; border: 3px solid #8e44ad; }
.is-style-royaume-nord       { background-color: #e9f7ff; border: 3px solid #7cc7e8; }
.is-style-royaume-muraille   { background-color: #f0ebe3; border: 3px solid #8a7a66; }
.is-style-royaume-pirates    { background-color: #e5f8f9; border: 3px solid #1ca6b8; }
.is-style-royaume-cauchemars { background-color: #eee7ff; border: 3px solid #6c4bb8; }
.is-style-royaume-vampires   { background-color: #f7e6e6; border: 3px solid #8b0000; }

[class*="is-style-royaume-"] {
	scroll-margin-top: 110px;
}

/* Liste de personnages : chaque paragraphe devient une pastille */
.is-style-liste-personnages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}
.is-style-liste-personnages > p,
p.is-style-pastille {
	display: inline-block;
	margin: 0;
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--or);
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.3;
}
p.is-style-pastille {
	display: block;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

/* Personnages avec fiche : toute la pastille est cliquable */
.is-style-liste-personnages > p {
	position: relative;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.is-style-liste-personnages > p a {
	color: var(--wp--preset--color--or);
	text-decoration: none;
}
.is-style-liste-personnages > p a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
}
.is-style-liste-personnages > p:has(a) {
	box-shadow: 0 0 0 2px var(--wp--preset--color--or) inset;
}
.is-style-liste-personnages > p:has(a):hover,
.is-style-liste-personnages > p:has(a:focus-visible) {
	background: var(--wp--preset--color--violet);
	transform: translateY(-2px);
}

/* Blasons des royaumes */
.dc-logo-royaume img {
	height: 110px;
	width: auto;
	object-fit: contain;
}

/* ---------- Cartes de contes (listes) ---------- */
.dc-carte-conte {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.dc-carte-conte .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--corail);
}
.dc-carte-conte .wp-block-post-excerpt {
	flex-grow: 1;
}
.dc-carte-conte .wp-block-post-excerpt__excerpt {
	margin: 0;
}
.dc-carte-conte .wp-block-read-more {
	align-self: center;
	background: var(--wp--preset--color--ambre);
	color: #071b3d !important;
	padding: 0.6rem 1.4rem;
	border-radius: 40px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	box-shadow: 0 0 18px rgba(255, 159, 28, 0.35);
	transition: transform 0.25s ease, background-color 0.25s ease;
}
.dc-carte-conte .wp-block-read-more:hover,
.dc-carte-conte .wp-block-read-more:focus {
	background: var(--wp--preset--color--or);
	transform: scale(1.05);
}
.dc-grille-contes .wp-block-post-template {
	gap: 25px;
}

/* ---------- Lecture d'un conte ---------- */
.dc-conte-texte {
	font-family: var(--wp--preset--font-family--opendyslexic);
	font-size: 1.125rem;
	line-height: 1.9;
}
.dc-conte-texte p {
	margin-block: 0 1.1em;
}
.dc-conte-texte h2,
.dc-conte-texte h3 {
	font-family: var(--wp--preset--font-family--georgia);
	margin-block: 2em 0.8em;
}
.dc-conte-texte > *:first-child {
	margin-top: 0;
}

/* Navigation entre contes */
.dc-conte-navigation a {
	text-decoration: none;
}

/* ---------- Archives de l'ancien blog ---------- */
.dc-archives details {
	border-top: 1px solid rgba(16, 43, 99, 0.15);
	padding: 0.6rem 0;
}
.dc-archives details:first-of-type {
	border-top: 0;
}
.dc-archives summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--cuivre);
}
.dc-archives ul {
	margin: 0.6rem 0 0.2rem;
	columns: 2 260px;
}
.dc-archives li {
	break-inside: avoid;
	margin-bottom: 0.25rem;
}

/* ---------- Images ---------- */
.dc-image-age img {
	height: 130px;
	width: auto;
	object-fit: contain;
}
.dc-logo-hero img {
	border-radius: 10px;
}

/* ---------- Animation douce ---------- */
@keyframes dc-flotte {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}
.dc-flotte {
	animation: dc-flotte 3s infinite ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
	.dc-flotte,
	.is-style-carte-age,
	.wp-block-button__link,
	.dc-carte-conte .wp-block-read-more {
		animation: none;
		transition: none;
	}
	.is-style-carte-age:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}

/* ---------- Petits écrans ---------- */
@media (max-width: 781px) {
	.is-style-parchemin,
	[class*="is-style-royaume-"] {
		border-radius: 20px;
	}
	.dc-pied {
		justify-content: center !important;
		text-align: center;
	}
}
