body {
	margin: 0;
	font-family: Georgia, Times, Times New Roman, serif;
	background: #f3e7c9;
	color: #2b2b2b;
	text-align: center;
}

header {
	background: #7a0000;
	color: #fff;
	padding: 15px;
	font-size: 22px;
	letter-spacing: 2px;
}

h2 {
	margin: 15px 0 5px 0;
}

.nav {
	margin: 10px;
}

button {
	background: #7a0000;
	color: white;
	border: none;
	padding: 8px 14px;
	margin: 5px;
	cursor: pointer;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	box-sizing: border-box;
	line-height: 1.2;
}
button#monthPrev::before {
	content: '◀ Mois précédent';
}
button#monthNext::before {
	content: 'Mois suivant ▶';
}
button#today::before{
	content: 'Aujourd\'hui';
}

button:hover {
	background: #a00000;
}

.calendar {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 8px;
	max-width: 1000px;
	margin: 20px auto;
}
.day {
	background: #fffaf0;
	border: 1px solid #bfa76a;
	padding: 8px;
	min-height: 70px;
	position: relative;
}

.day-number {
	font-weight: bold;
	font-size: 16px;
}

.decade-name {
	font-size: 11px;
	color: #7a0000;
}

.moon {
	position: absolute;
	top: 6px;
	right: 6px;
	font-size: 15px;
	filter: grayscale(30%);
}

.day-link::before {
  position: absolute;
  top: 6px;
  left: 6px;
  content: "🔗";
  font-size: 15px;
  cursor: pointer;
}

.ephemeride {
	font-size: 12px;
	margin-top: 4px;
}

.animal {
	border: 1px solid #00d400;
	background: #e4ffe1;
}

.outil {
	border: 1px solid #d4d400;
	background: #ffffe1;
}

.today {
	border: 2px solid #d40000;
	background: #ffe4e1;
}

.footer-note {
	margin: 20px;
	font-size: 12px;
}

.decade-header {
	display: contents;
}

.decade-cell {
	font-weight: bold;
	text-align: center;
	padding: 6px;
	background: #eee;
	border-bottom: 2px solid #333;
}

/* =========================
   RESPONSIVE MOBILE
   ========================= */

@media (max-width: 768px) {

	body {
		text-align: left;
	}

	header {
		font-size: 18px;
		padding: 12px;
		text-align: center;
	}

	h2 {
		font-size: 18px;
		text-align: center;
	}

	.nav {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin: 10px 20px;
	}

	button {
		width: 100%;
		box-sizing: border-box;
		min-height: 44px;
		padding: 10px 14px;
		margin: 0;
	}
	button#monthPrev::before {
		content: '◀';
	}
	button#monthNext::before {
		content: '▶';
	}

	/* Calendrier en colonne unique */
	.calendar {
		grid-template-columns: 1fr;
		max-width: 100%;
		margin: 10px;
	}

	/* On masque l'en-tête des décades */
	.decade-header,
	.decade-cell {
		display: none;
	}

	.day {
		min-height: auto;
		padding: 12px;
		border-radius: 6px;
	}

	.day-number {
		font-size: 18px;
	}

	.ephemeride {
		font-size: 14px;
	}

	.moon {
		font-size: 18px;
	}
}
