/*
 * Make-Up Show — front-end only styles: base, header, navigation,
 * footer, accessibility widget and default page/post templates.
 * Tokens and shared components live in global.css.
 *
 * Author: Bilal Yasin — https://bilalyasindev.com
 */

/* =========================================================
   BASE
   ========================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	overflow-x: hidden;
}

body {
	margin: 0;
	font-family: var(--ms-font-sans);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--ms-ink);
	background: var(--ms-white);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ms-font-serif);
	font-weight: 400;
}

a {
	color: inherit;
}

img,
svg {
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--ms-fuchsia);
	outline-offset: 2px;
}

.ms-skip-link {
	position: absolute;
	left: -9999px;
}

.ms-skip-link:focus {
	position: fixed;
	left: 0.5rem;
	top: 0.5rem;
	z-index: 100;
	padding: 0.75rem;
	background: var(--ms-white);
}

/* WordPress core helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* =========================================================
   TOP BAR
   ========================================================= */
.ms-topbar {
	padding: 0.5rem 1rem;
	background: var(--ms-ink);
	color: var(--ms-white);
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.25em;
	text-align: center;
	text-transform: uppercase;
}

/* =========================================================
   HEADER
   ========================================================= */
.ms-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--ms-border);
}

.admin-bar .ms-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ms-header {
		top: 0;
	}
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself
   would trap the fixed mobile drawer inside the header box. */
.ms-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.85);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.ms-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 4rem;
}

.ms-header__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.ms-header__menu-btn {
	margin-left: -0.5rem;
}

.ms-header__actions {
	display: flex;
	align-items: center;
}

.ms-header__search {
	display: none;
}

@media (min-width: 640px) {
	.ms-header__search {
		display: flex;
	}
}

.ms-header__cart-count {
	position: absolute;
	top: 0.375rem;
	right: 0.375rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 1rem;
	height: 1rem;
	padding: 0 0.25rem;
	font-size: 0.55rem;
	font-weight: 600;
	color: var(--ms-white);
	background: var(--ms-fuchsia);
	border-radius: 999px;
}

/* =========================================================
   NAVIGATION — mobile drawer
   ========================================================= */
.ms-nav {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 60;
	width: min(20rem, 85vw);
	overflow-y: auto;
	background: var(--ms-white);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.3s ease, visibility 0.3s;
}

.ms-nav.is-open {
	transform: translateX(0);
	visibility: visible;
}

.ms-nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 55;
	background: rgba(0, 0, 0, 0.5);
}

.ms-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
	padding: 0 0.5rem 0 1.25rem;
	border-bottom: 1px solid var(--ms-border);
}

.ms-nav__list,
.ms-nav__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-nav__item {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid var(--ms-border);
}

.ms-nav__link {
	position: relative;
	flex: 1;
	padding: 1rem 1.25rem;
	font-weight: 500;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.ms-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 1px;
	background: var(--ms-fuchsia);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
	display: none;
}

/* Current page only (as in the design: parents are not highlighted) */
.ms-nav__link[aria-current="page"] {
	color: var(--ms-fuchsia);
}

.ms-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.ms-nav__toggle[aria-expanded="true"] {
	transform: rotate(180deg);
}

.ms-nav__dropdown {
	display: none;
	width: 100%;
	padding-bottom: 0.5rem;
}

.ms-nav__item.is-open > .ms-nav__dropdown {
	display: block;
}

.ms-nav__sub a {
	display: block;
	padding: 0.625rem 1.25rem 0.625rem 2rem;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}

.ms-nav__sub a:hover {
	background: var(--ms-blush);
	color: var(--ms-fuchsia);
}

/* Add the CSS class "ms-nav__sub-all" to a menu item for the "Tout voir →" style */
.ms-nav__sub .ms-nav__sub-all {
	margin-top: 0.25rem;
	border-top: 1px solid var(--ms-border);
}

.ms-nav__sub .ms-nav__sub-all a {
	font-size: 0.65rem;
	font-weight: 600;
	color: var(--ms-fuchsia);
}

body.ms-nav-open {
	overflow: hidden;
}

/* =========================================================
   NAVIGATION — desktop
   ========================================================= */
@media (min-width: 1024px) {
	.ms-header__menu-btn,
	.ms-nav__head,
	.ms-nav__toggle,
	.ms-nav-overlay {
		display: none !important;
	}

	.ms-nav {
		position: static;
		z-index: auto;
		width: auto;
		overflow: visible;
		background: none;
		transform: none;
		transition: none;
		visibility: visible;
	}

	.ms-nav__list {
		display: flex;
		align-items: center;
		gap: 1.75rem;
	}

	.ms-nav__item {
		display: block;
		border: 0;
	}

	.ms-nav__link {
		display: block;
		padding: 0;
	}

	.ms-nav__link::after {
		display: block;
	}

	.ms-nav__link:hover::after,
	.ms-nav__link[aria-current="page"]::after {
		transform: scaleX(1);
	}

	.ms-nav__dropdown {
		position: absolute;
		top: 100%;
		left: 50%;
		z-index: 50;
		display: block;
		width: auto;
		min-width: 15rem;
		padding: 1rem 0 0;
		visibility: hidden;
		opacity: 0;
		transform: translateX(-50%);
		transition: opacity 0.15s ease, visibility 0.15s ease;
	}

	.ms-nav__item:hover > .ms-nav__dropdown,
	.ms-nav__item:focus-within > .ms-nav__dropdown {
		visibility: visible;
		opacity: 1;
	}

	.ms-nav__sub {
		padding: 0.5rem 0;
		background: var(--ms-white);
		border: 1px solid var(--ms-border);
		box-shadow: var(--ms-shadow-lift);
	}

	.ms-nav__sub a {
		padding: 0.625rem 1.25rem;
		white-space: nowrap;
	}
}

/* =========================================================
   PAGE CONTENT
   ========================================================= */
.ms-main {
	display: block;
}

/* Pages built from blocks: content is constrained, sections go full width. */
.ms-entry-content {
	padding-inline: var(--ms-gutter);
}

.ms-entry-content > .alignfull {
	margin-inline: calc(-1 * var(--ms-gutter));
	max-width: none;
}

.ms-entry-content > .ms-block {
	margin-block: 0;
}

/* Default templates (posts, archives, 404) */
.ms-page {
	padding-block: 4rem;
}

.ms-page__title {
	margin: 0 0 2rem;
	font-size: clamp(1.9rem, 3.6vw, 2.75rem);
	line-height: 1.12;
}

.ms-post-list {
	display: grid;
	gap: 2.5rem;
}

.ms-post-card__title {
	margin: 1rem 0 0.25rem;
	font-size: 1.5rem;
}

.ms-post-card__title a {
	text-decoration: none;
}

.ms-post-card__meta {
	font-size: 0.75rem;
	color: var(--ms-text-muted);
}

.ms-post-content {
	max-width: 48rem;
	line-height: 1.7;
}

.ms-post-content a {
	color: var(--ms-fuchsia);
}

/* =========================================================
   FOOTER
   ========================================================= */
.ms-footer {
	background: var(--ms-ink);
	color: var(--ms-white);
}

.ms-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-footer p,
.ms-footer h3 {
	margin: 0;
}

.ms-footer a {
	text-decoration: none;
}

.ms-footer__grid {
	display: grid;
	gap: 2.5rem;
	padding-block: 4rem;
}

@media (min-width: 640px) {
	.ms-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.ms-footer__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ms-footer__about {
	max-width: 20rem;
	margin-top: 1rem !important;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--ms-ink-muted);
}

.ms-footer__social {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.ms-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--ms-ink-border);
	border-radius: 50%;
	transition: border-color 0.15s ease;
}

.ms-footer__social-link:hover {
	border-color: var(--ms-fuchsia);
}

.ms-footer__title {
	margin-bottom: 1.25rem !important;
	font-size: 1.125rem;
	line-height: 1.75rem;
}

.ms-footer__links {
	display: grid;
	gap: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5rem;
	color: var(--ms-ink-muted);
}

.ms-footer__links a {
	transition: color 0.15s ease;
}

.ms-footer__links a:hover {
	color: var(--ms-fuchsia-logo);
}

.ms-footer__contact li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	line-height: 1.25rem;
}

.ms-footer__contact .ms-icon {
	color: var(--ms-fuchsia);
}

.ms-footer__bottom {
	border-top: 1px solid var(--ms-ink-border);
}

.ms-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-block: 1.5rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: var(--ms-ink-muted);
}

@media (min-width: 640px) {
	.ms-footer__bottom-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.ms-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.5rem;
}

.ms-footer__legal li + li::before {
	content: "·";
	margin-right: 0.5rem;
}

.ms-footer__legal a:hover {
	color: var(--ms-fuchsia-logo);
}

/* =========================================================
   ACCESSIBILITY WIDGET
   ========================================================= */
.ms-a11y {
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	z-index: 35;
}

.ms-a11y button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.ms-a11y__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	color: var(--ms-white) !important;
	background: var(--ms-ink) !important;
	border-radius: 50%;
	box-shadow: var(--ms-shadow-lift);
	transition: background-color 0.15s ease;
}

.ms-a11y__toggle:hover,
.ms-a11y__toggle[aria-expanded="true"] {
	background: var(--ms-fuchsia) !important;
}

.ms-a11y__panel {
	position: absolute;
	bottom: calc(100% + 0.75rem);
	left: 0;
	width: 16rem;
	padding: 1.25rem;
	background: var(--ms-white);
	border: 1px solid var(--ms-border);
	box-shadow: var(--ms-shadow-lift);
}

.ms-a11y__panel[hidden] {
	display: none;
}

.ms-a11y__title {
	margin: 0 0 0.75rem;
	font-family: var(--ms-font-serif);
	font-size: 1.125rem;
}

.ms-a11y__options {
	display: grid;
	gap: 0.375rem;
}

.ms-a11y .ms-a11y__option {
	width: 100%;
	padding: 0.6rem 0.75rem;
	font-size: 0.8rem;
	text-align: left;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
}

.ms-a11y .ms-a11y__option[aria-pressed="true"] {
	color: var(--ms-white);
	background: var(--ms-fuchsia);
	border-color: var(--ms-fuchsia);
}

.ms-a11y .ms-a11y__reset {
	margin-top: 0.75rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ms-fuchsia);
}

/* Accessibility modes (classes set on <html> by main.js) */
html.a11y-text-lg { font-size: 112.5%; }
html.a11y-text-xl { font-size: 125%; }

html.a11y-contrast {
	--ms-text-muted: #1c1c1c;
	--ms-border: #333333;
	--ms-fuchsia: #9c0472;
	--ms-ink-muted: #e6e6e6;
}

html.a11y-dys body,
html.a11y-dys h1,
html.a11y-dys h2,
html.a11y-dys h3,
html.a11y-dys .ms-logo,
html.a11y-dys .ms-block {
	font-family: Verdana, Tahoma, Arial, sans-serif !important;
	letter-spacing: 0.04em;
	word-spacing: 0.12em;
}

html.a11y-spacing body {
	line-height: 1.9 !important;
	letter-spacing: 0.06em;
	word-spacing: 0.16em;
}

html.a11y-links a {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* =========================================================
   QUANTITY STEPPER (product page + side cart, every page)
   ========================================================= */
.ms-qty {
	display: flex;
	align-items: center;
	border: 1px solid var(--ms-input);
}

.ms-qty__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.ms-qty__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ms-qty__input {
	width: 2.5rem;
	padding: 0;
	font: inherit;
	text-align: center;
	background: none;
	border: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.ms-qty__input::-webkit-outer-spin-button,
.ms-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* =========================================================
   PAGINATION (shop, categories, blog)
   ========================================================= */
.ms-pagination {
	margin-top: 2.5rem;
}

.ms-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-pagination a,
.ms-pagination span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.75rem;
	font-size: 0.875rem;
	text-decoration: none;
	border: 1px solid var(--ms-border);
}

.ms-pagination a:hover {
	border-color: var(--ms-ink);
}

.ms-pagination .current {
	color: var(--ms-white);
	background: var(--ms-ink);
	border-color: var(--ms-ink);
}
