/*
 * « Trouver mon local » : the result card takes the height of its content, at once.
 * Pavilion, floor and room stay readable at a glance on phones: no small inner scroll box.
 * Loaded after carte.css (dependency), so these rules win over its max-height / overflow.
 */
.pc-carte .pc-local .pc-local__resultat,
.pc-carte .pc-local .pc-local__carte { max-height: none; overflow: visible; }
.pc-carte .pc-local .pc-local__carte { animation-name: pc-local-apparaitre; }
@keyframes pc-local-apparaitre { from { opacity: 0; } to { opacity: 1; } }

/* =========================================================== « Mon horaire »: several courses pasted at once */
.pc-carte .pc-horaire { gap: 0; padding: 16px; font-size: 16px; line-height: 1.35; }
.pc-horaire__tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.pc-carte .pc-horaire__titre { margin: 0; font-size: 18px; font-weight: 700; color: var(--pc-bleu-fonce); display: flex; align-items: baseline; gap: 8px; }
.pc-horaire__nombre { font-size: 14px; font-weight: 500; color: #5f6368; }
.pc-carte .pc-horaire__jour { margin: 12px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5f6368; }
.pc-carte .pc-horaire__groupe { list-style: none; margin: 0; padding: 0; }
.pc-carte .pc-horaire__groupe li { margin: 0; padding: 0; }
.pc-carte .pc-horaire__cours {
	display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px;
	margin: 2px 0; padding: 10px 12px; border-radius: 12px; text-align: left;
	background: #f4f7f9; border: 1px solid transparent;
	transition: background-color var(--pc-duree) var(--pc-courbe), border-color var(--pc-duree) var(--pc-courbe);
}
.pc-carte .pc-horaire__cours:hover { background: #e8f0f5; }
.pc-carte .pc-horaire__cours[aria-current] { background: #fff4d6; border-color: var(--pc-orange); }
.pc-horaire__ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-horaire__numero {
	flex: none; width: 24px; height: 24px; border-radius: 12px; display: inline-grid; place-items: center;
	background: var(--pc-bleu-fonce); color: #fff; font-size: 13px; font-weight: 700;
}
.pc-horaire__heure { font-weight: 600; color: #222; }
.pc-horaire__code { margin-left: auto; font-weight: 700; letter-spacing: 0.03em; color: var(--pc-bleu-fonce); }
.pc-horaire__sigle { font-weight: 600; color: #000; }
.pc-horaire__lieu { color: #444; font-size: 15px; }
.pc-horaire__lieu--aucun { color: #5f6368; font-style: italic; }
.pc-horaire__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 12px; }
.pc-carte .pc-horaire__actions .pc-local__voir { margin-top: 0; }
.pc-carte .pc-horaire__effacer { min-height: 44px; padding: 0 4px; color: var(--pc-rouge); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pc-carte .pc-horaire__prive { margin: 6px 0 0; color: #5f6368; font-size: 14px; }
.pc-horaire__prive::before { content: ""; display: inline-block; width: 12px; height: 14px; margin-right: 6px; vertical-align: -2px; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 14%22%3E%3Crect x=%221%22 y=%226%22 width=%2210%22 height=%227%22 rx=%221.5%22 fill=%22%235f6368%22/%3E%3Cpath d=%22M3.2 6V4.2a2.8 2.8 0 0 1 5.6 0V6%22 fill=%22none%22 stroke=%22%235f6368%22 stroke-width=%221.6%22/%3E%3C/svg%3E") no-repeat center / contain; }

/* previous / next course */
.pc-horaire__nav { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; }
.pc-carte .pc-horaire__nav-texte { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; flex-direction: column; text-align: center; line-height: 1.25; }
.pc-horaire__nav-texte strong { font-size: 16px; color: var(--pc-bleu-fonce); }
.pc-horaire__nav-texte > span { font-size: 14px; color: #5f6368; }
/* the full place, never cut: it wraps between « · » pieces, each piece stays on one line */
.pc-horaire__nav-lieu { overflow-wrap: anywhere; }
.pc-horaire__nav-lieu span { white-space: nowrap; }
.pc-horaire__nav-quand { overflow-wrap: anywhere; }
.pc-horaire__nav-quand span { white-space: nowrap; }
.pc-carte .pc-horaire__fleche {
	flex: none; width: 44px; height: 44px; border-radius: 22px; background: #eef3f6;
	display: grid; place-items: center;
}
.pc-carte .pc-horaire__fleche:hover { background: #dde8ef; }
.pc-horaire__fleche::before { content: ""; width: 10px; height: 10px; border: solid var(--pc-bleu-fonce); border-width: 0 0 3px 3px; transform: translateX(2px) rotate(45deg); }
.pc-horaire__fleche--suiv::before { transform: translateX(-2px) rotate(-135deg); }
.pc-carte .pc-horaire__reduire { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; margin: -8px -8px -8px 0; }
.pc-horaire__reduire::before { content: ""; width: 10px; height: 10px; border: solid #5f6368; border-width: 3px 3px 0 0; transform: translateY(3px) rotate(-45deg); }

/* « Mon horaire (4 cours) »: a pill under the field */
.pc-carte .pc-horaire__ouvrir, .pc-carte .pc-horaire__liste-btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
	background: #fff; color: var(--pc-bleu-fonce); font-size: 16px; font-weight: 600;
	border: 1px solid #c9d6de; border-radius: 22px;
}
.pc-horaire__ouvrir::before, .pc-horaire__liste-btn::before {
	content: ""; width: 18px; height: 18px; flex: none;
	background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23205a7c%22 stroke-width=%222%22 stroke-linecap=%22round%22%3E%3Crect x=%223.5%22 y=%225%22 width=%2217%22 height=%2215.5%22 rx=%222%22/%3E%3Cpath d=%22M3.5 10h17M8 3v4M16 3v4%22/%3E%3C/svg%3E") no-repeat center / contain;
}
.pc-carte .pc-horaire__ouvrir:hover, .pc-carte .pc-horaire__liste-btn:hover { background: #f1f6f9; }
.pc-horaire__barre { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 8px 4px; background: #fff; border-radius: 16px; border: 1px solid #d6dde2; }
.pc-horaire__barre .pc-horaire__nav { margin: 0; }
.pc-carte .pc-horaire__barre .pc-horaire__liste-btn { align-self: center; min-height: 40px; border: 0; padding: 0 12px; font-size: 15px; }
@media (max-width: 991.98px) {
	/* phones: the bar stays compact so the building keeps room between it and the sheet */
	.pc-horaire__barre { padding: 6px 4px 0; }
	.pc-carte .pc-horaire__barre .pc-horaire__fleche { width: 40px; height: 40px; }
	.pc-horaire__barre .pc-horaire__nav-texte strong { font-size: 15px; }
	.pc-horaire__barre .pc-horaire__nav-texte > span { font-size: 13px; }
	.pc-carte .pc-horaire__barre .pc-horaire__liste-btn { min-height: 36px; font-size: 14px; }
}

@media (min-width: 992px) {
	.pc-carte .pc-local .pc-local__resultat { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
	.pc-carte .pc-local .pc-local__resultat:has(.pc-horaire) { max-height: 62vh; }
}
@media (max-width: 991.98px) {
	.pc-carte .pc-local .pc-horaire { max-height: calc((var(--pc-vv, 100dvh) - var(--pc-carte-haut-vv, 0px) - var(--pc-entetes-mobile)) * 0.66); overflow-y: auto; overscroll-behavior: contain; }
	.pc-carte .pc-horaire__ouvrir { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); border: 0; }
	.pc-horaire__barre { border: 0; border-radius: 20px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22); }
}
