:root {
	--coral: #ff6b52;
	--coral-dark: #e2503a;
	--indigo: #56509f;
	--indigo-light: #ecebf7;
	--divider: #fe6500;
	--paper: #ffffff;
	--paper-alt: #f5f5f5;
	--ink: #2b2b2b;
	--ink-soft: rgba(43, 43, 43, 0.65);
	/* alias conserves pour compatibilite avec le reste des templates */
	--blue: var(--indigo);
	--blue-dark: var(--indigo);
	--blue-light: var(--indigo-light);
	--yellow: var(--coral);
	--yellow-dark: var(--coral-dark);
	--warm: var(--coral);
	--cream: var(--paper);
	--fg: var(--ink);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Quicksand', Arial, Helvetica, sans-serif;
	background: var(--paper);
	color: var(--ink);
	line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 0.75em;
}
h1, h2, h3 { font-weight: 300; }
h4, h5, h6 { font-weight: 500; }

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Header */
header.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255,255,255,0.97);
	border-bottom: 1px solid #ececec;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem 1rem;
	padding: 0.75rem 1.5rem;
	max-width: 1600px;
	margin: 0 auto;
	position: relative;
}
.logo img { height: 40px; width: auto; }

/* Bouton hamburger (mobile/tablette) */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	cursor: pointer;
	margin-left: auto;
}
.nav-toggle-label span {
	display: block;
	height: 3px;
	width: 100%;
	background: var(--ink);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

nav.main-nav {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.1rem;
	font-weight: 700;
	font-size: calc(0.8rem + 5px);
	white-space: nowrap;
}
nav.main-nav a { padding: 0.5rem 0.6rem; color: var(--ink); transition: color 0.15s ease; }
nav.main-nav a:hover { color: var(--coral); }

/* En dessous de 1220px : nav masquee derriere le hamburger (elle ne tient pas sur une ligne avant) */
@media (max-width: 1219px) {
	nav.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		flex-wrap: wrap;
		white-space: normal;
		background: #fff;
		border-top: 1px solid #ececec;
		border-bottom: 1px solid #ececec;
		padding: 0.5rem 1.5rem 1rem;
		gap: 0.25rem;
		font-size: calc(0.9rem + 5px);
	}
	nav.main-nav a { padding: 0.65rem 0.5rem; }
	.nav-toggle-checkbox:checked ~ nav.main-nav { display: flex; }
}
@media (min-width: 1220px) {
	.nav-toggle-label { display: none; }
}
.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
.nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Menu utilisateur connecte */
.user-menu { position: relative; margin-left: auto; }
.user-menu-checkbox { display: none; }
.user-menu-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	padding: 0.35rem 0.7rem 0.35rem 0.35rem;
	background: var(--indigo-light);
}
.user-menu-avatar {
	/* exception assumee : un badge d'initiale reste circulaire pour rester lisible */
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 999px;
	background: var(--indigo);
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.user-menu-name { font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.user-menu-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.5rem;
	background: #fff;
	border: 1px solid #e5e5e5;
	padding: 0.5rem;
	min-width: 220px;
	z-index: 60;
}
.user-menu-dropdown a {
	display: block;
	padding: 0.55rem 0.75rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ink);
}
.user-menu-dropdown a:hover { background: var(--paper-alt); }
.user-menu-dropdown a.user-menu-logout { color: var(--coral); margin-top: 0.25rem; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 0.65rem; }
.user-menu-checkbox:checked ~ .user-menu-dropdown { display: block; }
@media (max-width: 1219px) {
	.user-menu { order: 2; margin-left: 0; }
}
@media (max-width: 640px) {
	.user-menu-name { display: none; }
}

.login-btn { margin-left: auto; }
@media (max-width: 1219px) {
	.login-btn { order: 2; margin-left: 0; padding: 0.45rem 0.9rem; font-size: 0.85rem; }
}

.btn-cta {
	background: var(--coral);
	color: #fff;
	font-weight: 700;
	padding: 0.6rem 1.2rem;
	white-space: nowrap;
}

/* Footer */
footer.site-footer { background: var(--indigo); color: #fff; margin-top: 3rem; }
.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
	padding: 3rem 1.5rem;
	max-width: 1100px;
	margin: 0 auto;
}
.footer-grid h3 { color: var(--coral); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a:hover { text-decoration: underline; }
.footer-logo { display: inline-block; background: #fff; padding: 0.5rem 1rem; margin-bottom: 1rem; }
.footer-logo img { height: 48px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.65); padding: 1rem; }

/* Hero / sections */
.hero { background: var(--paper-alt); padding: 0 0 4rem; }
.hero-logo { display: block; width: 100%; height: auto; margin: 0 0 1.5rem; }
@media (min-width: 800px) { .hero-logo { margin-bottom: 1.75rem; } }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 800px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.eyebrow {
	display: inline-block;
	color: var(--coral);
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
h1.page-title { color: var(--ink); font-weight: 300; font-size: 2.6rem; margin: 0.5rem 0 1rem; line-height: 1.15; }
.section { padding: 3.5rem 0; }
.section-muted { background: var(--paper-alt); }

/* En-tete de section centre, avec petit trait decoratif -- dans l'esprit d'abracadabus.be */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-divider { width: 50px; height: 3px; background: var(--divider); border: none; margin: 0.9rem auto 0; }

/* Bandeau CTA sur photo, avec compteurs animes au scroll (esprit bande "stats" d'abracadabus.be) */
.photo-cta {
	position: relative;
	background-image: linear-gradient(165deg, rgba(86,80,159,0.94), rgba(255,107,82,0.88)), var(--photo-cta-img);
	background-size: cover;
	background-position: center;
	color: #fff;
	padding: 4.5rem 0;
}
.photo-cta .section-head h2 { color: #fff; }
.photo-cta .section-head p { color: rgba(255,255,255,0.9); margin: 0.75rem 0 0; }
.photo-cta .section-divider { background: #fff; }
.photo-cta .btn-outline-white { margin-top: 1.5rem; }
.photo-cta-edit-hint {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	font-size: 0.7rem;
	font-weight: 700;
	color: #fff;
	background: rgba(255,255,255,0.2);
	padding: 0.3rem 0.7rem;
	cursor: pointer;
}
.stat-counter { text-align: center; }
.stat-counter-num { font-size: 2.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-counter-label { font-size: 0.9rem; margin-top: 0.35rem; color: rgba(255,255,255,0.9); }
/* Grille souple : le nombre de chiffres cles peut varier (repeater editable) */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 700px) { .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

.card { background: #fff; border: 1px solid rgba(0,0,0,0.08); padding: 1.5rem; }
.card-tinted { background: var(--indigo-light); border-color: transparent; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
	.grid-2 { grid-template-columns: 1fr 1fr; }
	.grid-3 { grid-template-columns: repeat(3, 1fr); }
	.grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Bandeau de galerie photo, pleine largeur, esprit documentaire */
.gallery-strip { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-strip { grid-template-columns: repeat(4, 1fr); } }
.gallery-strip-item { aspect-ratio: 525 / 560; overflow: hidden; }
.gallery-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }

/* Equipe */
.team-member { text-align: center; }
.team-member img { width: 120px; height: 120px; margin: 0 auto 1rem; display: block; }
.team-member .team-name { margin: 0; font-weight: 700; }
.team-member .team-role { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	font-weight: 700;
	border: 2px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-warm { background: var(--coral); color: #fff; }
.btn-warm:hover { background: var(--coral-dark); }
.btn-outline { border-color: var(--coral); color: var(--coral); }
.btn-outline:hover { background: var(--coral); color: #fff; }
.btn-outline-white { border-color: #fff; color: #fff; }
.btn-outline-white:hover { background: #fff; color: var(--indigo); }
.cta-box { background: var(--indigo); color: #fff; padding: 2.5rem; text-align: center; }
.cta-box h2 { color: #fff; }
img { max-width: 100%; height: auto; }
.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--coral); }
.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 700px) { .book-grid { grid-template-columns: repeat(4, 1fr); } }
form.pw-form label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; margin-top: 1rem; font-size: 0.9rem; }
form.pw-form input, form.pw-form textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid rgba(0,0,0,0.2);
	font-family: inherit;
	font-size: 1rem;
	background: #fff;
	color: var(--ink);
}
form.pw-form input:focus, form.pw-form textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
form.pw-form button { margin-top: 1.25rem; border: none; cursor: pointer; }
.partner-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; }

/* Guide d'utilisation : liste d'etapes numerotees */
ol.steps { list-style: none; counter-reset: step; margin: 0 0 1.2rem; padding: 0; }
ol.steps li {
	counter-increment: step;
	position: relative;
	padding: 0 0 1.1rem 2.5rem;
	border-left: 2px solid var(--indigo-light);
	margin-left: 0.9rem;
}
ol.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps li::before {
	/* exception assumee : le jeton d'etape reste circulaire (reperage fonctionnel) */
	content: counter(step);
	position: absolute;
	left: -0.9rem;
	top: 0;
	width: 1.8rem;
	height: 1.8rem;
	background: var(--coral);
	color: #fff;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ui-btn {
	font-weight: 700;
	font-size: 0.85em;
	background: var(--coral);
	color: #fff;
	padding: 0.15rem 0.7rem;
	display: inline-block;
}
.ui-path {
	font-family: ui-monospace, Consolas, monospace;
	font-size: 0.9em;
	color: var(--indigo);
	background: var(--indigo-light);
	padding: 0.05rem 0.4rem;
}

/* Edition au survol : remplace le double-clic par un cadre + bouton "Editer"
   visible au survol de toute zone editable (voir main.js pour l'injection du bouton). */
.pw-edit, .pw-modal-dblclick { position: relative; }
.pw-edit:hover, .pw-modal-dblclick:hover { outline: 2px dashed var(--coral); outline-offset: 3px; }
.pw-hover-edit-btn {
	position: absolute;
	top: -12px;
	left: -3px;
	z-index: 500;
	display: none;
	align-items: center;
	background: var(--coral);
	color: #fff;
	border: none;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	padding: 0.25rem 0.6rem;
	cursor: pointer;
	line-height: 1;
}
.pw-hover-edit-btn:hover { background: var(--coral-dark); }
.pw-edit:hover > .pw-hover-edit-btn,
.pw-modal-dblclick:hover > .pw-hover-edit-btn { display: inline-flex; }
.pw-edit.pw-editing > .pw-hover-edit-btn { display: none; }

/* Reglages fins petits ecrans */
@media (max-width: 640px) {
	.container { padding: 0 1.1rem; }
	h1.page-title { font-size: 1.85rem; }
	.hero { padding: 0 0 2.25rem; }
	.section { padding: 2.25rem 0; }
	.cta-box { padding: 1.75rem 1.25rem; }
	.card { padding: 1.25rem; }
	.footer-grid { padding: 2rem 1.25rem; gap: 1.5rem; text-align: left; }
	.btn { padding: 0.7rem 1.25rem; font-size: 0.95rem; }
}
