/* Piselword Theme — Base CSS (front + éditeur Gutenberg). Cyberpunk edition. */

* { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	line-height: 1.2;
	font-weight: 700;
	font-family: "Orbitron", "Segoe UI", sans-serif;
	color: var(--piselword-fg, #F8FAFC);
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }

/* === Header cyberpunk avec menu + burger mobile === */
.pw-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(6, 8, 15, 0.85);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--piselword-border, #282C47);
	box-shadow: 0 1px 0 rgba(0, 217, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.3);
}
.pw-header__inner {
	max-width: 1400px; margin: 0 auto;
	display: flex; align-items: center; justify-content: space-between;
	padding: 1rem 1.5rem; gap: 1.5rem;
}
.pw-header__branding { display: flex; align-items: center; gap: 0.75rem; }
.pw-header__title {
	font-family: "Orbitron", sans-serif;
	font-size: 1.3rem; font-weight: 700;
	letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--piselword-cyan, #00D9FF);
	text-shadow: 0 0 12px rgba(0, 217, 255, 0.5);
	text-decoration: none;
	transition: text-shadow 0.2s;
}
.pw-header__title:hover { text-shadow: 0 0 18px rgba(0, 217, 255, 0.8), 0 0 4px #FF00FF; }
.pw-header .custom-logo { max-height: 44px; width: auto; }

/* Nav menu */
.pw-header__nav .pw-menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: center; gap: 1.75rem;
}
.pw-header__nav .pw-menu li { position: relative; }
.pw-header__nav .pw-menu a {
	color: var(--piselword-fg, #F8FAFC);
	font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.95rem;
	text-decoration: none; padding: 0.4rem 0; position: relative;
	transition: color 0.2s;
}
.pw-header__nav .pw-menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
	background: linear-gradient(90deg, var(--piselword-cyan, #00D9FF), var(--piselword-magenta, #FF00FF));
	box-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
	transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.pw-header__nav .pw-menu a:hover,
.pw-header__nav .pw-menu .current-menu-item > a,
.pw-header__nav .pw-menu .current_page_item > a {
	color: var(--piselword-cyan, #00D9FF);
}
.pw-header__nav .pw-menu a:hover::after,
.pw-header__nav .pw-menu .current-menu-item > a::after,
.pw-header__nav .pw-menu .current_page_item > a::after {
	transform: scaleX(1);
}

/* Sous-menus (dropdown) */
.pw-header__nav .pw-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 200px;
	background: var(--piselword-card, #0C0F1C);
	border: 1px solid var(--piselword-border, #282C47);
	border-radius: 8px; padding: 0.5rem;
	list-style: none; margin: 0.5rem 0 0;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 217, 255, 0.1);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: all 0.18s; z-index: 10;
}
.pw-header__nav .pw-menu > li:hover > .sub-menu,
.pw-header__nav .pw-menu > li:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0);
}
.pw-header__nav .pw-menu .sub-menu a {
	display: block; padding: 0.5rem 0.8rem; border-radius: 4px;
	font-size: 0.9rem; white-space: nowrap;
}
.pw-header__nav .pw-menu .sub-menu a::after { display: none; }
.pw-header__nav .pw-menu .sub-menu a:hover {
	background: rgba(0, 217, 255, 0.1); color: var(--piselword-cyan, #00D9FF);
}

/* Burger */
.pw-header__burger {
	display: none;
	width: 40px; height: 40px; padding: 0;
	background: transparent; border: 1px solid var(--piselword-border, #282C47); border-radius: 6px;
	cursor: pointer; position: relative;
	transition: border-color 0.2s;
}
.pw-header__burger:hover { border-color: var(--piselword-cyan, #00D9FF); }
.pw-header__burger span {
	display: block; position: absolute; left: 8px; right: 8px; height: 2px;
	background: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 6px rgba(0, 217, 255, 0.6);
	transition: all 0.25s; border-radius: 2px;
}
.pw-header__burger span:nth-child(1) { top: 12px; }
.pw-header__burger span:nth-child(2) { top: 19px; }
.pw-header__burger span:nth-child(3) { top: 26px; }
.pw-header__burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.pw-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pw-header__burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Mobile */
@media (max-width: 900px) {
	.pw-header__burger { display: block; }
	.pw-header__nav {
		position: fixed; top: 0; right: 0; bottom: 0;
		width: min(320px, 85vw);
		background: var(--piselword-card, #0C0F1C);
		border-left: 1px solid var(--piselword-border, #282C47);
		padding: 4.5rem 1.5rem 2rem;
		transform: translateX(100%); transition: transform 0.3s;
		box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
		z-index: 99;
	}
	.pw-header__nav.is-open { transform: translateX(0); }
	.pw-header__nav .pw-menu {
		flex-direction: column; align-items: stretch; gap: 0.25rem;
	}
	.pw-header__nav .pw-menu a {
		display: block; padding: 0.85rem 1rem; border-radius: 6px;
		font-size: 1rem;
	}
	.pw-header__nav .pw-menu a::after { display: none; }
	.pw-header__nav .pw-menu a:hover,
	.pw-header__nav .pw-menu .current-menu-item > a {
		background: rgba(0, 217, 255, 0.1);
	}
	.pw-header__nav .pw-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		background: transparent; border: none; box-shadow: none;
		padding: 0 0 0 1rem; margin: 0;
	}
}

/* === Styles pour wp-block-navigation (core WP) dans un template Piselword === */
.piselword-template--header .wp-block-navigation,
body .wp-block-navigation {
	font-family: "Inter", sans-serif;
}
body .wp-block-navigation__container {
	gap: 1.75rem !important;
}
body .wp-block-navigation-item__content {
	color: var(--piselword-fg, #F8FAFC) !important;
	font-weight: 500; font-size: 0.95rem;
	padding: 0.4rem 0; position: relative;
	text-decoration: none;
	transition: color 0.2s;
}
body .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
	background: linear-gradient(90deg, var(--piselword-cyan, #00D9FF), var(--piselword-magenta, #FF00FF));
	box-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
	transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
body .wp-block-navigation-item__content:hover,
body .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--piselword-cyan, #00D9FF) !important;
}
body .wp-block-navigation-item__content:hover::after,
body .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}
body .wp-block-navigation .wp-block-navigation-submenu__toggle {
	color: inherit;
}
body .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--piselword-card, #0C0F1C) !important;
	border: 1px solid var(--piselword-border, #282C47);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 217, 255, 0.1);
}

/* === Footer cyberpunk === */
.pw-footer {
	margin-top: 4rem;
	background: linear-gradient(180deg, var(--piselword-card, #0C0F1C) 0%, rgba(6, 8, 15, 0.98) 100%);
	border-top: 1px solid var(--piselword-border, #282C47);
	color: var(--piselword-muted, #9398B5);
	position: relative;
}
.pw-footer::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
	background: linear-gradient(90deg, transparent, var(--piselword-cyan, #00D9FF), transparent);
	opacity: 0.5;
}
.pw-footer__inner {
	max-width: 1400px; margin: 0 auto;
	display: grid; grid-template-columns: 2fr 1fr 1fr;
	gap: 3rem; padding: 3rem 1.5rem 2rem;
}
.pw-footer__col-title {
	color: var(--piselword-fg, #F8FAFC);
	font-family: "Orbitron", sans-serif; font-size: 0.9rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.08em;
	margin: 0 0 1rem;
}
.pw-footer__title {
	font-family: "Orbitron", sans-serif; font-size: 1.4rem; font-weight: 700;
	color: var(--piselword-cyan, #00D9FF);
	text-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
	text-decoration: none; display: inline-block; margin-bottom: 0.75rem;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.pw-footer__tagline { font-size: 0.95rem; line-height: 1.5; margin: 0; }
.pw-footer__menu {
	list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem;
}
.pw-footer__menu a {
	color: var(--piselword-muted, #9398B5); text-decoration: none;
	transition: color 0.2s; font-size: 0.95rem;
}
.pw-footer__menu a:hover { color: var(--piselword-cyan, #00D9FF); }
.pw-footer__bottom {
	max-width: 1400px; margin: 0 auto;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-top: 1px solid var(--piselword-border, #282C47);
	font-size: 0.85rem; opacity: 0.75;
}
.pw-footer__powered a {
	color: var(--piselword-cyan, #00D9FF); text-decoration: none; font-weight: 600;
}
@media (max-width: 768px) {
	.pw-footer__inner { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem 1.5rem; }
	.pw-footer__bottom { flex-direction: column; text-align: center; }
}

.piselword-canvas { margin: 0; padding: 0; }

/* Single post */
.piselword-post .entry-header { margin: 2.5rem 0 1.25rem; }
.piselword-post .entry-title {
	font-size: clamp(2rem, 5vw, 3rem);
	background: linear-gradient(135deg, var(--piselword-cyan, #00D9FF) 0%, var(--piselword-magenta, #FF00FF) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.piselword-post .entry-meta {
	color: var(--piselword-muted, #9398B5);
	font-size: 0.85rem;
	font-family: "JetBrains Mono", monospace;
}
.piselword-post .entry-thumbnail img {
	border-radius: var(--piselword-radius, 12px);
	border: 1px solid var(--piselword-border, #282C47);
}
.piselword-post .entry-content {
	line-height: 1.75;
	font-size: 1.05rem;
	color: var(--piselword-fg, #F8FAFC);
}

/* Archive */
.archive-header { margin: 2.5rem 0; }
.archive-title  {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	color: var(--piselword-cyan, #00D9FF);
	text-shadow: 0 0 16px rgba(0, 217, 255, 0.35);
}
.archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
}
.archive-card {
	border: 1px solid var(--piselword-border, #282C47);
	border-radius: var(--piselword-radius, 12px);
	overflow: hidden;
	background: var(--piselword-card, #0C0F1C);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.archive-card:hover {
	border-color: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 24px rgba(0, 217, 255, 0.2);
	transform: translateY(-4px);
}
.archive-card__thumb { display: block; aspect-ratio: 16/10; overflow: hidden; }
.archive-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.archive-card:hover .archive-card__thumb img { transform: scale(1.05); }
.archive-card__body  { padding: 1.25rem; }
.archive-card__title {
	font-size: 1.15rem;
	margin: 0 0 0.5rem;
	font-family: "Orbitron", sans-serif;
}
.archive-card__title a {
	color: var(--piselword-fg, #F8FAFC);
	text-decoration: none;
}
.archive-card__title a:hover { color: var(--piselword-cyan, #00D9FF); }
.archive-card__meta {
	font-size: 0.75rem;
	color: var(--piselword-muted, #9398B5);
	margin-bottom: 0.5rem;
	font-family: "JetBrains Mono", monospace;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.archive-card__excerpt { font-size: 0.9rem; color: var(--piselword-muted, #9398B5); margin: 0; line-height: 1.5; }

/* Search */
.search-header { margin: 2rem 0; }
.search-result {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--piselword-border, #282C47);
}
.search-result__meta {
	font-size: 0.75rem;
	color: var(--piselword-muted, #9398B5);
	margin: 0.25rem 0 0.5rem;
	font-family: "JetBrains Mono", monospace;
}
.search-result__cta {
	color: var(--piselword-cyan, #00D9FF);
	text-decoration: none;
	font-weight: 600;
	font-family: "Orbitron", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.85rem;
}
.search-result__cta:hover { text-shadow: 0 0 8px rgba(0, 217, 255, 0.7); }

/* Search form */
.search-form { display: flex; gap: 0.5rem; max-width: 480px; }
.search-form__input {
	flex: 1;
	padding: 0.7rem 0.95rem;
	background: var(--piselword-card, #0C0F1C);
	border: 1px solid var(--piselword-border, #282C47);
	color: var(--piselword-fg, #F8FAFC);
	border-radius: 8px;
	font: inherit;
}
.search-form__input:focus {
	outline: none;
	border-color: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}
.search-form__btn {
	padding: 0.7rem 1.5rem;
	background: transparent;
	color: var(--piselword-cyan, #00D9FF);
	border: 1px solid var(--piselword-cyan, #00D9FF);
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-family: "Orbitron", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: all 0.2s ease;
}
.search-form__btn:hover {
	background: rgba(0, 217, 255, 0.1);
	box-shadow: 0 0 16px rgba(0, 217, 255, 0.5);
}

/* 404 */
.error-404 { text-align: center; padding: 5rem 1rem; }
.error-404__title {
	font-size: clamp(4rem, 14vw, 10rem);
	margin: 0;
	line-height: 1;
	font-family: "Orbitron", sans-serif;
	font-weight: 800;
	background: linear-gradient(135deg, var(--piselword-cyan, #00D9FF) 0%, var(--piselword-magenta, #FF00FF) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	filter: drop-shadow(0 0 24px rgba(0, 217, 255, 0.4));
}
.error-404__lead { font-size: 1.5rem; margin: 0.75rem 0 1rem; color: var(--piselword-fg, #F8FAFC); }
.error-404__text { color: var(--piselword-muted, #9398B5); margin-bottom: 2rem; }
.error-404__btn {
	display: inline-block;
	padding: 0.85rem 2rem;
	background: transparent;
	color: var(--piselword-cyan, #00D9FF);
	border: 1px solid var(--piselword-cyan, #00D9FF);
	text-decoration: none;
	border-radius: 12px;
	font-weight: 600;
	font-family: "Orbitron", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	transition: all 0.3s ease;
}
.error-404__btn:hover {
	background: rgba(0, 217, 255, 0.1);
	box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
	transform: translateY(-2px);
}
.error-404__search { margin-top: 2rem; display: flex; justify-content: center; }

/* Pagination */
.pagination { margin: 2rem 0; display: flex; justify-content: center; gap: 0.4rem; }
.pagination .page-numbers {
	padding: 0.5rem 0.9rem;
	border-radius: 6px;
	text-decoration: none;
	color: var(--piselword-fg, #F8FAFC);
	border: 1px solid var(--piselword-border, #282C47);
	background: var(--piselword-card, #0C0F1C);
	font-family: "JetBrains Mono", monospace;
	font-size: 0.9rem;
	transition: all 0.2s ease;
}
.pagination .page-numbers:hover {
	border-color: var(--piselword-cyan, #00D9FF);
	color: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 12px rgba(0, 217, 255, 0.3);
}
.pagination .current {
	background: var(--piselword-cyan, #00D9FF);
	color: var(--piselword-bg, #06080F);
	border-color: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 16px rgba(0, 217, 255, 0.5);
}

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-list .comment {
	padding: 1.25rem;
	border: 1px solid var(--piselword-border, #282C47);
	background: var(--piselword-card, #0C0F1C);
	border-radius: 12px;
	margin-bottom: 1rem;
}
.comment-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 640px; }
.comment-form input,
.comment-form textarea {
	padding: 0.7rem 0.95rem;
	background: var(--piselword-card, #0C0F1C);
	border: 1px solid var(--piselword-border, #282C47);
	color: var(--piselword-fg, #F8FAFC);
	border-radius: 8px;
	font: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--piselword-cyan, #00D9FF);
	box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}
.comment-form__submit {
	padding: 0.85rem 2rem;
	background: transparent;
	color: var(--piselword-cyan, #00D9FF);
	border: 1px solid var(--piselword-cyan, #00D9FF);
	border-radius: 12px;
	cursor: pointer;
	font-weight: 600;
	font-family: "Orbitron", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	align-self: flex-start;
	transition: all 0.3s ease;
}
.comment-form__submit:hover {
	background: rgba(0, 217, 255, 0.1);
	box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
	transform: translateY(-2px);
}

/* WooCommerce */
.woocommerce-content { padding: 2rem 0; }
.woocommerce-content .price { color: var(--piselword-cyan, #00D9FF); font-family: "Orbitron", sans-serif; font-weight: 700; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
	left: 1rem; top: 1rem;
	background: var(--piselword-cyan, #00D9FF);
	color: var(--piselword-bg, #06080F);
	padding: 0.5rem 1rem;
	z-index: 9999;
	border-radius: 8px;
	font-family: "Orbitron", sans-serif;
}
