/*
 * Maison Cahute — fondations du theme (reset, typographie, header/footer,
 * conteneurs, boutons). Design tokens canoniques : toute couleur du site
 * doit venir d'ici, jamais redefinie ailleurs.
 */

:root {
	/* Couleurs de base — patrimoine du Nord + streetwear sobre, aucune couleur criarde. */
	--mc-ink: #0b0b0d; /* noir profond */
	--mc-cream: #f1e9d8; /* creme textile */
	--mc-gold: #a3833a; /* dore vieilli, discret */
	--mc-bottle: #1f3d30; /* vert bouteille */
	--mc-burgundy: #551b23; /* bordeaux profond */
	--mc-navy: #12172a; /* bleu nuit */

	--mc-bg: var(--mc-ink);
	--mc-fg: #f4f0e6;
	--mc-accent: var(--mc-gold);
	--mc-overlay: rgba(0, 0, 0, 0.45);
	--mc-radius: 12px;

	--mc-cream-ink: #241f18;
	--mc-cream-muted: #756b58;
	--mc-cream-line: rgba(36, 31, 24, 0.12);

	--mc-city-tint: var(--mc-gold);

	--mc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mc-container: 1240px;
	--mc-header-height: 76px;
	--mc-ease: cubic-bezier(0.45, 0, 0.2, 1);
}

[data-city="arras"] { --mc-city-tint: var(--mc-gold); }
[data-city="cambrai"] { --mc-city-tint: var(--mc-bottle); }
[data-city="lens"] { --mc-city-tint: var(--mc-burgundy); }

/* ---------- Reset minimal ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--mc-font);
	color: var(--mc-ink);
	background: var(--mc-cream);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

button { font-family: inherit; }

.screen-reader-text {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mc-skip-link:focus {
	position: fixed;
	left: 12px;
	top: 12px;
	z-index: 9999;
	background: var(--mc-ink);
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	width: auto;
	height: auto;
	overflow: visible;
}

:focus-visible {
	outline: 2px solid var(--mc-gold);
	outline-offset: 2px;
}

/* ---------- Typographie ---------- */

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-wrap: balance;
	margin: 0 0 0.5em;
}

.mc-container {
	max-width: var(--mc-container);
	margin: 0 auto;
	padding: 0 24px;
}

.mc-cta-button {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 4px;
	background: var(--mc-gold);
	color: #0b0b0b;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.mc-cta-button:hover, .mc-cta-button:focus-visible { opacity: 0.88; }

.mc-cta-button--ghost {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--mc-ink);
}

/* ---------- En-tete ---------- */

.mc-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	width: 100%;
	background: var(--mc-cream);
	border-bottom: 1px solid var(--mc-cream-line);
	transition: background 0.3s var(--mc-ease), border-color 0.3s var(--mc-ease);
}

/* En-tete overlay (home + pages villes) : TRANSPARENTE EN PERMANENCE, y
   compris au scroll (demande Dany). La lisibilite du texte blanc au-dessus
   des sections claires est assuree par une ombre portee douce, pas par un
   fond. La classe is-solid posee par mc-site.js n'a volontairement plus
   aucun style. */
.mc-site-header--overlay {
	position: fixed;
	background: transparent;
	border-bottom-color: transparent;
}

.mc-site-header--overlay .mc-site-logo,
.mc-site-header--overlay .mc-site-nav-list a,
.mc-site-header--overlay .mc-cart-link {
	color: var(--mc-fg);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.mc-site-header--overlay .mc-menu-toggle-bar {
	background: var(--mc-fg);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.mc-site-header-inner {
	max-width: var(--mc-container);
	margin: 0 auto;
	height: var(--mc-header-height);
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.mc-site-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.02em;
	font-size: 1.05rem;
	color: var(--mc-ink);
}

.mc-site-logo img { max-height: 36px; width: auto; }

.mc-site-nav-list {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 32px;
}

.mc-site-nav-list li { position: relative; }

.mc-site-nav-list a {
	text-decoration: none;
	color: var(--mc-ink);
	font-size: 0.92rem;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.mc-site-header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.mc-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: var(--mc-ink);
	font-size: 0.9rem;
}

.mc-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--mc-gold);
	color: #0b0b0b;
	font-size: 0.7rem;
	font-weight: 700;
}

.mc-menu-toggle {
	appearance: none;
	border: none;
	background: transparent;
	width: 32px;
	height: 24px;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	cursor: pointer;
}

.mc-menu-toggle-bar {
	display: block;
	height: 2px;
	background: var(--mc-ink);
	border-radius: 2px;
	transition: transform 0.25s var(--mc-ease), opacity 0.25s var(--mc-ease);
}

.mc-menu-toggle.is-open .mc-menu-toggle-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mc-menu-toggle.is-open .mc-menu-toggle-bar:nth-child(2) { opacity: 0; }
.mc-menu-toggle.is-open .mc-menu-toggle-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mc-mobile-menu {
	position: fixed;
	inset: 0;
	top: var(--mc-header-height);
	background: var(--mc-ink);
	color: var(--mc-fg);
	transform: translateY(-8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s var(--mc-ease), transform 0.25s var(--mc-ease), visibility 0.25s;
	z-index: 99;
	overflow-y: auto;
}

.mc-mobile-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mc-mobile-menu-list {
	list-style: none;
	margin: 0;
	padding: 32px 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mc-mobile-menu-list a {
	text-decoration: none;
	color: var(--mc-fg);
	font-size: 1.4rem;
	font-weight: 700;
}

html.mc-menu-open { overflow: hidden; }

@media (min-width: 900px) {
	.mc-site-nav-list { display: flex; }
	.mc-menu-toggle { display: none; }
	.mc-mobile-menu { display: none; }
}

/* ---------- Contenu generique (pages, blog, recherche, 404) ---------- */

.mc-main-content { min-height: 40vh; }

.mc-page-content { padding: 56px 24px 80px; }

.mc-page-title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 0.6em;
}

.mc-page-body {
	max-width: 72ch;
	line-height: 1.75;
	font-size: 1.05rem;
}

.mc-page-body img { border-radius: var(--mc-radius); }

.mc-entry-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 32px;
	margin-top: 24px;
}

.mc-entry-card-link { text-decoration: none; color: inherit; display: block; }
.mc-entry-card-thumb img { border-radius: var(--mc-radius); aspect-ratio: 4/3; object-fit: cover; }
.mc-entry-card-title { font-size: 1.1rem; margin: 12px 0 8px; }
.mc-entry-card-excerpt { color: var(--mc-cream-muted); font-size: 0.95rem; }

.mc-404 { text-align: center; }

/* ---------- Commentaires / avis produit ---------- */

.mc-comments { padding: 40px 24px 80px; }
.mc-comments-title { font-size: 1.3rem; }
.mc-comment-list { list-style: none; padding: 0; margin: 24px 0; }
.mc-comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--mc-cream-line); }

/* ---------- Pied de page ---------- */

.mc-site-footer {
	background: var(--mc-ink);
	color: var(--mc-fg);
	padding: 64px 24px 32px;
}

.mc-site-footer-inner {
	max-width: var(--mc-container);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

.mc-footer-brand {
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: 0.02em;
}

.mc-footer-tagline {
	color: rgba(244, 240, 230, 0.7);
	max-width: 34ch;
	margin-top: 10px;
}

.mc-footer-heading {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(244, 240, 230, 0.6);
	margin-bottom: 14px;
}

.mc-footer-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mc-footer-nav-list a { text-decoration: none; color: var(--mc-fg); font-size: 0.92rem; }

.mc-site-footer-bottom {
	max-width: var(--mc-container);
	margin: 48px auto 0;
	padding-top: 24px;
	border-top: 1px solid rgba(244, 240, 230, 0.12);
	font-size: 0.8rem;
	color: rgba(244, 240, 230, 0.55);
}

@media (min-width: 700px) {
	.mc-site-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}
