/* ======================================================
   HEADER — /css/header.css du thème enfant
====================================================== */

.ach {
	--ach-h: 90px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9000;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: start;
	padding: 20px 24px 0;
	box-sizing: border-box;
	pointer-events: none;            /* le header ne bloque pas les clics en dessous… */
	font-family: "Simplon BP Mono Light", monospace;
}
.ach > * { pointer-events: auto; }   /* …sauf sur ses éléments */

/* ---------- Logo ---------- */
.ach-logo {
	justify-self: start;
	display: block;
	line-height: 0;
}
.ach-logo img {
	width: clamp(140px, 12vw, 240px);
	height: auto;
	display: block;
}

/* ---------- Menu ---------- */
.ach-nav {
	display: flex;
	gap: clamp(40px, 5.5vw, 110px);
	padding-top: 20px;
}
.ach-nav a {
	color: var(--ach-color, #fff);
	font-size: clamp(14px, 1vw, 20px);
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: color .3s ease;
}
.ach-nav a:hover,
.ach-nav a.is-active { color: var(--ach-hover, #7a1f3a); }

/* Si ton JS ajoute menu-light / menu-dark selon la section */
.menu-light .ach-nav a { color: #000; }
.menu-dark  .ach-nav a { color: #fff; }

/* ---------- L'échoppe ---------- */
.ach-echoppe {
	justify-self: end;
	display: block;
	line-height: 0;
	transition: transform .3s ease;
}
.ach-echoppe img {
	width: clamp(110px, 8vw, 160px);
	height: auto;
	display: block;
}
.ach-echoppe:hover { transform: rotate(-6deg); }

/* ---------- Burger (caché sur desktop) ---------- */
.ach-burger {
	display: none;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.ach-burger:focus,
.ach-burger:hover { background: none; box-shadow: none; }
.ach-burger img { width: 32px; height: auto; display: block; }

/* Sur les pages projet : la languette retour remplace le logo */
body.single-post .ach-logo { visibility: hidden; }

/* ======================================================
   LANGUETTE COORDONNÉES (bord gauche)
====================================================== */
.ach-tab {
	position: fixed;
	left: -50px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9001;
	width: 130px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	transition: transform .3s ease;
}
.ach-tab:hover,
.ach-tab:focus { background: none; transform: translate(36px, -50%); }
.ach-tab img { width: 100%; height: auto; display: block; }

/* Pas de languette sur les pages projet */
body.single-post .ach-tab { display: none; }

/* ======================================================
   PANNEAU COORDONNÉES
====================================================== */
.ach-coord {
	position: fixed;
	inset: 0;
	z-index: 99998;
	visibility: hidden;
	pointer-events: none;
}
.ach-coord.is-open { visibility: visible; pointer-events: auto; }

.ach-coord__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .25);
	opacity: 0;
	transition: opacity .3s ease;
}
.ach-coord.is-open .ach-coord__backdrop { opacity: 1; }

.ach-coord__panel {
	position: absolute;
	left: 0;
	top: 50%;
	width: max-content;            /* le cadre = la taille réelle du papier */
	line-height: 0;
	color: #333;
	font-family: "Simplon BP Mono Light", monospace;
	transform: translate(-105%, -50%);
	transition: transform .4s ease;
}
.ach-coord.is-open .ach-coord__panel { transform: translate(0, -50%); }

/* L'image papier, en entier, collée à gauche quelle que soit la taille d'écran */
.ach-coord__paper {
	display: block;
	width: auto;
	height: auto;
	max-width: min(520px, 92vw);   /* largeur max du papier */
	max-height: 98vh;              /* hauteur max du papier */
	pointer-events: none;
	user-select: none;
}

/* Le texte posé sur le papier */
.ach-coord__contenu {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	padding: 40% 15% 20%;          /* marges intérieures : ajuste selon les bords du papier */
	overflow-y: auto;
	scrollbar-width: none;
}
.ach-coord__contenu::-webkit-scrollbar { display: none; }

.ach-coord__close {
	position: absolute;
	top: 3%;
	right: 4%;
	width: 50px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
}
.ach-coord__close:hover,
.ach-coord__close:focus { background: none; }
.ach-coord__close img { width: 100%; height: auto; transition: transform .2s ease; }
.ach-coord__close:hover img { transform: rotate(90deg); }

.ach-coord__titre {
	font-family: inherit;
	font-size: 20px;
	font-weight: 400;
	margin: 0 0 20px;
	color: #000;
}
.ach-coord__texte {
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 24px;
}
.ach-coord__texte p { margin: 0 0 1em; }

.ach-coord__btn {
	display: inline-block;
	padding: 10px 24px;
	background: #7a1f3a;
	color: #fff !important;
	border-radius: 20px;
	font-size: 14px;
	text-decoration: none !important;
	transition: background .3s ease;
}
.ach-coord__btn:hover { background: #5a1528; }

/* ======================================================
   MENU MOBILE (plein écran)
====================================================== */
.ach-mobile {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: var(--ach-mobile-bg, #6b7a55);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-family: "Simplon BP Mono Light", monospace;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.ach-mobile.is-open {
	opacity: 1;
	visibility: visible;
}

.ach-close {
	position: absolute;
	top: 12px;
	left: 12px;
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
}
.ach-close:focus,
.ach-close:hover { background: none; }
.ach-close img { width: 40px; height: auto; display: block; }

.ach-mobile-logo {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	line-height: 0;
}
.ach-mobile-logo img { width: 180px; height: auto; }

.ach-mobile-links {
	display: flex;
	flex-direction: column;
	gap: 36px;
}
.ach-mobile-links a {
	color: #fff;
	font-size: 22px;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: color .2s ease;
}
.ach-mobile-links a:hover,
.ach-mobile-links a.is-active { color: var(--ach-hover, #7a1f3a); }

.ach-mobile-echoppe {
	position: absolute;
	bottom: 40px;
	line-height: 0;
}
.ach-mobile-echoppe img { width: 180px; height: auto; }

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 768px) {
	.ach {
		grid-template-columns: auto 1fr auto;
		align-items: center;
		padding: 14px 16px 0;
	}
	.ach-burger { display: block; }
	.ach-nav,
	.ach-echoppe { display: none; }

	.ach-logo {
		justify-self: center;
		grid-column: 2;
	}
	.ach-logo img { width: 110px; }

	.ach-tab { display: none; }   /* sur mobile : Coordonnées via le burger */
}

@media (min-width: 769px) {
	.ach-mobile { display: none; }
}