/**
 * Hotel de Ville — style éditorial type institution / Paris.fr.
 * Couleurs : var(--wp--preset--color--*) modifiables dans l’éditeur de site.
 */

/* ----- En-tête : blanc opaque, filet (pas de flou) ----- */
.hdv-header-shell {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--base, #fff);
	border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0);
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

body.admin-bar .hdv-header-shell {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .hdv-header-shell {
		top: 46px;
	}
}

.hdv-header__inner {
	flex-wrap: nowrap;
	gap: 1rem 1.25rem;
	align-items: center;
}

.hdv-header__brand {
	flex: 0 1 auto;
	min-width: 0;
	max-width: min(100%, 14rem);
	align-items: center;
}

.hdv-header__nav {
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
}

.hdv-header__tools {
	flex: 0 1 auto;
	align-items: center;
	gap: 0.5rem 1rem;
}

.hdv-header-search.wp-block-search {
	min-width: 0;
	max-width: 11rem;
}

.hdv-header-search .wp-block-search__inside-wrapper {
	border-color: var(--wp--preset--color--border, #e0e0e0);
}

.hdv-header__logo .custom-logo-link,
.hdv-header__logo img {
	display: block;
	height: auto;
	max-height: 2.75rem;
	width: auto;
}

@media (max-width: 781px) {
	.hdv-header__inner {
		flex-wrap: wrap;
	}

	.hdv-header__nav {
		order: 3;
		flex: 1 1 100%;
		justify-content: flex-start;
	}

	.hdv-header__tools {
		margin-left: auto;
	}

	.hdv-front-columns {
		flex-direction: column !important;
	}

	.hdv-front-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.hdv-sidebar-acces {
		border-right: none !important;
		border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0);
		padding-right: 0 !important;
		padding-bottom: var(--wp--preset--spacing--40, 1.5rem);
	}
}

/* ----- Accès rapides (liste) ----- */
.hdv-acces-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.hdv-acces-list li {
	margin: 0 0 0.35rem;
	padding: 0;
}

.hdv-acces-list a {
	display: block;
	padding: 0.65rem 0.85rem;
	background: var(--wp--preset--color--surface, #f5f5f5);
	border: 1px solid var(--wp--preset--color--border, #e0e0e0);
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #0f172a);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.hdv-acces-list a:hover {
	background: var(--wp--preset--color--base, #fff);
	border-color: var(--wp--preset--color--primary, #002f6c);
}

.hdv-acces-list a:focus {
	outline: 2px solid var(--wp--preset--color--primary, #002f6c);
	outline-offset: 2px;
}

/* ----- Badge catégorie (À la une, ACTUALITÉ…) ----- */
.hdv-category-badge,
.hdv-hero-cover .hdv-category-badge {
	font-size: 0.65rem !important;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700 !important;
	color: var(--wp--preset--color--accent, #c8102e) !important;
	margin: 0 0 0.25rem !important;
}

.hdv-hero-cover .wp-block-post-terms.hdv-hero-terms {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-top: 0;
	margin-bottom: 0.35rem;
}

.hdv-hero-cover .wp-block-post-terms.hdv-hero-terms a {
	color: inherit;
	text-decoration: none;
}

.hdv-hero-cover .wp-block-post-terms.hdv-hero-terms a:hover {
	text-decoration: underline;
}

/* ----- Hero cover : image + dégradé bas ----- */
.hdv-hero-cover .wp-block-cover__image-background {
	object-fit: cover;
}

.hdv-hero-cover .wp-block-post-title a {
	color: inherit !important;
	text-decoration: none;
}

.hdv-hero-cover .wp-block-post-title a:hover {
	text-decoration: underline;
}

.hdv-hero-cover .wp-block-post-excerpt {
	color: rgba(255, 255, 255, 0.92);
}

/* ----- Fil info ----- */
.hdv-fil-info {
	border-left: 3px solid var(--wp--preset--color--accent, #c8102e);
}

.hdv-fil-info__item:last-child {
	border-bottom: none !important;
	padding-bottom: 0 !important;
}

.hdv-fil-info .wp-block-read-more a {
	text-decoration: none;
	color: var(--wp--preset--color--accent, #c8102e);
	font-weight: 700;
}

.hdv-fil-info .wp-block-read-more a:hover {
	text-decoration: underline;
}

/* ----- Grille actualités secondaires ----- */
.hdv-subnews-query .wp-block-post-template.is-layout-grid {
	gap: var(--wp--preset--spacing--40, 1.25rem);
}

@media (max-width: 600px) {
	.hdv-subnews-query .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ----- Zone compte dans l’en-tête ----- */
.hdv-account-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem 0.75rem;
	margin: 0;
}

.hdv-account-nav__link {
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	color: var(--wp--preset--color--primary, #002f6c);
	white-space: nowrap;
}

.hdv-account-nav__link:hover {
	color: var(--wp--preset--color--accent, #c8102e);
}

.hdv-account-nav__link:focus {
	outline: 2px solid var(--wp--preset--color--primary, #002f6c);
	outline-offset: 3px;
}

.hdv-account-nav__link--primary {
	padding: 0.45rem 0.9rem;
	border-radius: 4px;
	text-decoration: none;
	background: var(--wp--preset--color--primary, #002f6c);
	color: var(--wp--preset--color--base, #fff);
	border: 2px solid transparent;
}

.hdv-account-nav__link--primary:hover {
	background: var(--wp--preset--color--contrast, #0f172a);
	color: var(--wp--preset--color--base, #fff);
}

.hdv-account-nav__link--primary:focus {
	outline: 2px solid var(--wp--preset--color--accent, #c8102e);
	outline-offset: 2px;
}

/* ----- Gestion Compte : lanceur + modale ----- */
#cp-profile-btn {
	border-color: var(--wp--preset--color--border, #e0e0e0);
	background: var(--wp--preset--color--base, #fff);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

#cp-profile-btn:focus {
	outline: 2px solid var(--wp--preset--color--primary, #002f6c);
	outline-offset: 3px;
}

#cp-modal {
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--border, #e0e0e0);
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

#cp-modal .cp-header {
	border-bottom-color: var(--wp--preset--color--border, #e0e0e0);
}

#cp-modal .cp-step.active {
	background: var(--wp--preset--color--primary, #002f6c);
	color: var(--wp--preset--color--base, #fff);
	border-color: var(--wp--preset--color--primary, #002f6c);
}

#cp-modal .cp-btn.primary {
	background: var(--wp--preset--color--primary, #002f6c);
	border-color: var(--wp--preset--color--primary, #002f6c);
	color: var(--wp--preset--color--base, #fff);
}

#cp-modal .cp-btn.secondary {
	border-color: var(--wp--preset--color--border, #e0e0e0);
	color: var(--wp--preset--color--contrast, #0f172a);
}

#cp-modal .cp-btn.primary:hover,
#cp-modal .cp-btn.secondary:hover {
	filter: brightness(0.95);
}

#cp-modal-overlay {
	background: rgba(15, 23, 42, 0.45);
}
