/* Vues publiques.
   Volontairement léger : le thème garde la main sur la typographie, on ne
   reprend que ce qui distingue une date d'un paragraphe.
   Pour tout reprendre à zéro :  wp_dequeue_style('kiroul-dates'); */

.kd-annee,
.kd-passees,
.kd-dates,
.kd-vue-mois {
	--kd-accent: #ff9a14;   /* l'orange de la charte */
	--kd-doux:   0.62;      /* opacité des lignes secondaires */
}

/* ---------- sommaire des mois ---------- */

.kd-annee-titre {
	text-align: center;
	margin-bottom: 1.1em;
}

.kd-nav-mois {
	text-align: center;
	margin: 0 0 4.2em;
	font-size: 1.14em;
	letter-spacing: .02em;
}
.kd-nav-mois a {
	text-decoration: none;
	color: inherit;
	text-transform: capitalize;
}
.kd-nav-mois a:hover { color: var(--kd-accent); }
.kd-nav-mois a.kd-mois-vide { opacity: .35; }
.kd-nav-mois .kd-sep { opacity: .3; }

/* ---------- grille des douze mois ---------- */

.kd-grille-mois {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 4.4em 2em;
}

/* La colonne est centrée par le page builder ; les dates, elles, se lisent
   alignées à gauche. Le titre de l'année et le sommaire restent centrés. */
.kd-bloc-mois,
.kd-passees {
	text-align: left;
}

.kd-bloc-titre {
	margin: 0 0 1.5em;
	text-transform: capitalize;
	scroll-margin-top: 5em;
}

/* ---------- la liste ---------- */

/* `no-list` sur le <ul> neutralise déjà la puce d'Uncode ; ces règles couvrent
   les thèmes qui n'ont pas cette convention. */
ul.kd-dates {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 1.1em;
}

.kd-date {
	display: flex;
	gap: .75em;
	align-items: flex-start;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- la pastille du jour ---------- */

.kd-jour {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 3.1em;
	padding: .34em .32em .4em;
	border: 1px solid var(--kd-accent);
	line-height: 1;
	text-align: center;
}
.kd-jour .kd-jour-num {
	font-size: 1.48em;
	font-weight: 700;
	color: var(--kd-accent);
	font-variant-numeric: tabular-nums;
}
.kd-jour .kd-jour-mois {
	font-size: .85em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--kd-accent);
	margin: .3em 0 0;
}

/* ---------- le détail ---------- */

.kd-detail {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.4;
	padding-top: .1em;
}

.kd-titre-spectacle {
	font-size: 1.14em;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.25;
}

.kd-horaire {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: 1.05em;
	margin-top: .15em;
}

.kd-detail .kd-lieu {
	font-size: 1.01em;
	line-height: 1.4;
	opacity: var(--kd-doux);
	overflow-wrap: anywhere;
	margin-top: .2em;
}

.kd-detail .kd-infos {
	font-size: .97em;
	line-height: 1.4;
	font-style: italic;
	opacity: .55;
	overflow-wrap: anywhere;
	margin-top: .2em;
}

/* Un mois sans date garde sa place dans la grille. */
.kd-rien { min-height: 1em; margin: 0; }

/* ---------- dates passées, repliées par année ---------- */

.kd-passees { display: flex; flex-direction: column; }

.kd-annee-repli {
	border-bottom: 1px solid;
	border-color: rgba(128, 128, 128, .25);
	padding: .75em 0;
}
.kd-annee-repli > summary {
	cursor: pointer;
	display: flex;
	align-items: baseline;
	gap: .8em;
	list-style: none;
}
.kd-annee-repli > summary::-webkit-details-marker { display: none; }
.kd-annee-repli > summary::after {
	content: "+";
	margin-left: auto;
	color: var(--kd-accent);
	font-size: 1.1em;
	line-height: 1;
}
.kd-annee-repli[open] > summary::after { content: "–"; }
.kd-annee-nom { font-size: 1.18em; }
.kd-annee-compte { font-size: .93em; opacity: var(--kd-doux); }
.kd-annee-repli .kd-dates { margin-top: 1.3em; padding-bottom: .6em; }

@media (max-width: 640px) {
	.kd-grille-mois { grid-template-columns: 1fr; gap: 2em; }
}
