/* Carte golfradar — page d'accueil (direction « club-house × carte de score ») */

.gr-app { display: flex; flex-direction: column; min-height: calc(100vh - 64px); overflow-x: clip; }

/* ---------- Recherche ---------- */
.gr-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 24px 0; }
.gr-search {
	position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 460px;
	height: 46px; padding: 0 14px; border: 1px solid var(--gr-line-2); border-radius: var(--gr-radius); background: var(--gr-card);
}
.gr-search input { border: 0; outline: none; width: 100%; font: 15px var(--gr-font); background: transparent; color: var(--gr-ink); }
.gr-search input::placeholder { color: var(--gr-muted); }
.gr-search:focus-within { border-color: var(--gr-green); box-shadow: 0 0 0 3px rgba(47,74,52,.18); }
.gr-search-results {
	position: absolute; top: 50px; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px; list-style: none;
	background: var(--gr-surface); border: 1px solid var(--gr-line-2); border-radius: var(--gr-radius); box-shadow: 0 8px 24px rgba(42,38,32,.15);
}
.gr-search-results button {
	display: block; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left;
	font: 14px var(--gr-font); color: var(--gr-ink); border-radius: 4px; cursor: pointer;
}
.gr-search-results button:hover, .gr-search-results button:focus { background: var(--gr-green-soft); outline: none; }
.gr-btn--green { background: var(--gr-green); }

/* ---------- Dates : carte de score ---------- */
.gr-dates { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 12px; padding: 14px 24px 8px; min-width: 0; }
.gr-score {
	display: flex; flex: 1 1 560px; min-width: 0; overflow: hidden;
	border: 1.5px solid var(--gr-green); border-radius: var(--gr-radius); background: var(--gr-surface);
}
.gr-score__head {
	display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0; min-width: 70px; padding: 8px 10px;
	background: var(--gr-green); color: #fff; font-family: var(--gr-font-title); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.gr-days { display: flex; overflow-x: auto; flex: 1 1 auto; scrollbar-width: thin; }
.gr-day {
	display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; min-width: 60px; padding: 7px 2px 8px;
	border: 0; border-left: 1px solid var(--gr-line); background: var(--gr-surface); color: var(--gr-ink); cursor: pointer; font-family: var(--gr-font);
}
.gr-day--we { background: var(--gr-card); }
.gr-day:hover { background: var(--gr-green-soft); }
.gr-day__wd { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.gr-day__num { font-family: var(--gr-font-title); font-size: 24px; font-weight: 700; line-height: 1; }
.gr-day__count {
	min-width: 70%; padding-top: 3px; margin-top: 2px; border-top: 1px solid var(--gr-line);
	font-family: var(--gr-font-title); font-size: 18px; font-weight: 700; line-height: 1; color: var(--gr-brass);
}
.gr-day--empty { color: var(--gr-muted); }
.gr-day--empty .gr-day__count { color: var(--gr-muted); font-weight: 500; }
.gr-day[aria-pressed="true"] { background: var(--gr-ink); color: #fff; }
.gr-day[aria-pressed="true"] .gr-day__count { color: #f2d59b; border-top-color: rgba(255,255,255,.35); }

/* ---------- Boutons-filtres ---------- */
.gr-pill {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; flex-shrink: 0;
	border: 1px solid var(--gr-line-2); border-radius: var(--gr-radius); background: var(--gr-surface); color: var(--gr-ink);
	font: 600 14px var(--gr-font); cursor: pointer;
}
.gr-pill:hover { border-color: var(--gr-green); }
.gr-pill[aria-pressed="true"] { border-color: var(--gr-green); background: var(--gr-green); color: #fff; }
.gr-dates > .gr-pill { align-self: center; }
.gr-pill--date span { font-family: var(--gr-font-title); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--gr-muted); }
.gr-pill--date input { border: 0; font: 600 14px var(--gr-font); color: var(--gr-ink); background: transparent; }
.gr-dot { width: 10px; height: 10px; border-radius: 2px; }

.gr-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 24px 14px; min-width: 0; }
.gr-sep { width: 1px; height: 24px; align-self: center; background: var(--gr-line-2); margin: 0 4px; }

/* ---------- Carte + panneau ---------- */
.gr-main { display: flex; flex-wrap: wrap; gap: 16px; flex: 1 1 auto; min-height: 560px; padding: 0 24px 24px; }
.gr-map-wrap {
	position: relative; flex: 999 1 560px; min-width: 0; min-height: 600px;
	border: 1px solid var(--gr-line-2); border-radius: var(--gr-radius); overflow: hidden; background: #d3e3ea;
}
.gr-map { position: absolute; inset: 0; }
.gr-map-wrap .maplibregl-ctrl-group { border-radius: var(--gr-radius); box-shadow: none; border: 1px solid var(--gr-line-2); }
.gr-panel {
	flex: 1 1 360px; min-width: 0; max-height: calc(100vh - 230px); min-height: 600px; overflow-y: auto;
	padding: 22px; background: var(--gr-surface); border: 1px solid var(--gr-line-2); border-radius: var(--gr-radius);
}
.gr-panel h2 { margin: 0; padding-bottom: 10px; font-size: 32px; color: var(--gr-ink); border-bottom: 2px solid var(--gr-ink); }
.gr-panel .gr-sub { margin: 8px 0 14px; font-size: 14px; color: var(--gr-muted); }
.gr-panel .gr-card h3 { font-size: 24px; }

.gr-back {
	display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; margin-bottom: 12px;
	border: 0; border-radius: var(--gr-radius); background: var(--gr-green-soft); color: var(--gr-green); font: 700 13px var(--gr-font); cursor: pointer;
}
.gr-golfcard {
	display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 14px 16px; margin-bottom: 10px;
	border: 1px solid var(--gr-line); border-radius: var(--gr-radius); background: var(--gr-surface); text-align: left; cursor: pointer; font-family: var(--gr-font);
}
.gr-golfcard:hover { border-color: var(--gr-green); background: var(--gr-card); }
.gr-golfcard strong { font-family: var(--gr-font-title); font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; color: var(--gr-ink); }
.gr-nextday {
	display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; margin-bottom: 8px;
	border: 1px solid var(--gr-line); border-radius: var(--gr-radius); background: var(--gr-surface); color: var(--gr-ink); font: 15px var(--gr-font); text-align: left; cursor: pointer;
}
.gr-nextday:hover { border-color: var(--gr-green); }
.gr-nextday b { font-family: var(--gr-font-title); font-size: 18px; letter-spacing: .03em; color: var(--gr-green); }

.gr-legend {
	position: absolute; left: 12px; bottom: 30px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
	max-width: calc(100% - 24px); padding: 8px 12px; border-radius: var(--gr-radius); background: var(--gr-surface);
	border: 1px solid var(--gr-line); font-size: 12px; color: var(--gr-ink-2);
}
.gr-legend strong { font-family: var(--gr-font-title); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.gr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gr-legend b { padding: 1px 6px; border-radius: 3px; color: #fff; font-family: var(--gr-font-title); font-size: 13px; letter-spacing: .03em; }

.gr-loading { color: var(--gr-muted); font-size: 14px; }

@media (max-width: 760px) {
	.gr-header { padding: 10px 12px; }
	.gr-tagline { display: none; }
	.gr-bar, .gr-dates, .gr-filters { padding-left: 12px; padding-right: 12px; }
	.gr-score__head { min-width: 54px; padding: 8px 6px; font-size: 11px; }
	.gr-day { min-width: 48px; }
	.gr-filters { flex-wrap: nowrap; overflow-x: auto; }
	.gr-main { padding: 0 0 12px; gap: 0; }
	.gr-map-wrap { min-height: 58vh; border-radius: 0; border-left: 0; border-right: 0; }
	.gr-panel { max-height: none; min-height: 0; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
	.gr-legend { display: none; }
	.gr-pill--date { display: none; }
}

/* Résultats de recherche : golfs puis villes */
.gr-search-group { padding: 8px 12px 4px; font-family: var(--gr-font-title); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gr-muted); }
.gr-search-golf { display: block; padding: 10px 12px; border-radius: 4px; color: var(--gr-ink); text-decoration: none; font-size: 14px; }
.gr-search-golf:hover, .gr-search-golf:focus { background: var(--gr-green-soft); outline: none; }
.gr-search-golf strong { font-weight: 700; }

/* ---------- Écran unique : secteur, période, programme, calendrier du golf ---------- */
.gr-pill--select { gap: 8px; padding-right: 8px; max-width: 100%; }
.gr-pill--select span { font-family: var(--gr-font-title); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--gr-muted); }
.gr-pill--select select { min-width: 0; border: 0; background: transparent; font: 600 14px var(--gr-font); color: var(--gr-ink); cursor: pointer; }
.gr-pill--select.is-disabled { opacity: .55; }
.gr-pill--select.is-disabled select { cursor: not-allowed; }
.gr-pill--dep select { max-width: 220px; }
.gr-where { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.gr-where[hidden] { display: none; }
.gr-chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--gr-brass); border-radius: 16px;
	background: #f7ead3; color: var(--gr-ink); font: 600 13px var(--gr-font); cursor: pointer;
}
.gr-chip span { color: var(--gr-brass); }

.gr-seg { display: inline-flex; align-self: center; flex-shrink: 0; border: 1.5px solid var(--gr-green); border-radius: var(--gr-radius); overflow: hidden; }
.gr-seg__btn {
	min-height: 42px; padding: 0 14px; border: 0; border-left: 1px solid var(--gr-line-2); background: var(--gr-surface); color: var(--gr-ink);
	font: 600 14px var(--gr-font); cursor: pointer; white-space: nowrap;
}
.gr-seg__btn:first-child { border-left: 0; }
.gr-seg__btn[aria-pressed="true"] { background: var(--gr-green); color: #fff; }
.gr-seg--light { border-color: var(--gr-line-2); }
.gr-seg--light .gr-seg__btn[aria-pressed="true"] { background: var(--gr-ink); }
.gr-dates__day { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 12px; flex: 1 1 600px; min-width: 0; }
.gr-dates__day > .gr-pill { align-self: center; }
.gr-dates__period { display: flex; align-items: center; flex: 1 1 auto; }
.gr-dates__day[hidden], .gr-dates__period[hidden] { display: none; }

.gr-month { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 8px; font-size: 22px; color: var(--gr-green); }
.gr-month span { font-family: var(--gr-font); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--gr-muted); }

.gr-prow {
	display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; margin-bottom: 6px;
	background: var(--gr-surface); border: 1px solid var(--gr-line); border-left: 5px solid var(--c, var(--gr-green)); border-radius: var(--gr-radius);
	text-align: left; cursor: pointer; font-family: var(--gr-font); color: var(--gr-ink);
}
.gr-prow:hover { background: var(--gr-card); border-color: var(--gr-green); border-left-color: var(--c, var(--gr-green)); }
.gr-prow__date { display: flex; flex-direction: column; align-items: center; padding: 4px 0; border: 1px solid var(--gr-line-2); border-radius: 4px; background: var(--gr-card); }
.gr-prow__date small { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--gr-muted); }
.gr-prow__date strong { font-family: var(--gr-font-title); font-size: 24px; line-height: 1; }
.gr-prow__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gr-prow__main > strong { font-family: var(--gr-font-title); font-size: 19px; text-transform: uppercase; line-height: 1.05; }
.gr-prow .gr-badge { height: 22px; font-size: 13px; padding: 0 7px; }

.gr-mcals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gr-mcal { min-height: 64px; padding: 6px 8px; background: var(--gr-surface); border: 1px solid var(--gr-line); border-top: 3px solid var(--gr-green); border-radius: 4px; }
.gr-mcal--empty { border-top-color: var(--gr-line-2); background: transparent; }
.gr-mcal h4 { margin: 0 0 4px; font-family: var(--gr-font-title); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.gr-mcal h4 span { color: var(--gr-muted); font-weight: 500; }
.gr-mcal__item { display: inline-flex; align-items: center; gap: 3px; margin: 0 4px 3px 0; padding: 0; border: 0; background: none; cursor: pointer; font: 600 12px var(--gr-font); color: var(--gr-ink); }
.gr-mcal__item b { padding: 0 4px; border-radius: 3px; color: #fff; font-family: var(--gr-font-title); font-size: 12px; letter-spacing: .02em; }
.gr-mcal__item.is-past { opacity: .45; }
.gr-mcal__item:hover span { text-decoration: underline; }

@media (max-width: 760px) {
	.gr-bar { gap: 8px; }
	.gr-pill--select { flex: 1 1 140px; }
	.gr-pill--dep select { max-width: none; flex: 1 1 auto; }
	.gr-dates { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
	.gr-dates__day { flex: 0 0 auto; }
	.gr-dates__day .gr-score { flex: 1 1 100%; }
	.gr-dates > .gr-seg { align-self: stretch; }
	.gr-dates > .gr-seg .gr-seg__btn { flex: 1 1 auto; }
	.gr-dates__period { overflow-x: auto; }
	.gr-mcals { grid-template-columns: repeat(3, 1fr); }
}

/* Bouton « Partager » en tête du panneau */
.gr-panel__tools { display: flex; justify-content: flex-end; margin: -6px -6px 6px 0; }
.gr-share {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
	border: 1px solid var(--gr-brass); border-radius: var(--gr-radius); background: #f7ead3; color: var(--gr-ink);
	font: 700 14px var(--gr-font); cursor: pointer;
}
.gr-share svg { color: var(--gr-brass); }
.gr-share:hover { background: #f1dcb8; }
.gr-share.is-done { border-color: var(--gr-green); background: var(--gr-green-soft); }
@media (max-width: 760px) {
	.gr-panel__tools { margin: 0 0 8px; }
	.gr-share { width: 100%; justify-content: center; }
}

/* Lots : étiquette dans les listes et filtre */
.gr-lots-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 4px; background: #f7ead3; border: 1px solid #e2c48f; color: var(--gr-brass); font-size: 12px; font-weight: 700; white-space: nowrap; }
.gr-trophy { flex-shrink: 0; }
.gr-lots__title .gr-trophy { color: var(--gr-brass); }
.gr-pill--lots .gr-trophy { color: var(--gr-brass); }
.gr-pill--lots[aria-pressed="true"] { background: var(--gr-brass); border-color: var(--gr-brass); }
.gr-pill--lots[aria-pressed="true"] .gr-trophy { color: #fff; }

/* ---------- À la une ---------- */
.gr-une { margin: 0 0 18px; }
.gr-une__title { margin: 0 0 8px; font-size: 20px; color: var(--gr-brass); }
.gr-une__list { display: flex; flex-direction: column; gap: 8px; }
.gr-une__card {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; padding: 12px 14px 12px;
	border: 1.5px solid #e0a93b; border-radius: var(--gr-radius); background: linear-gradient(#fdf6e8, #fbf1df);
	text-align: left; cursor: pointer; font-family: var(--gr-font); color: var(--gr-ink);
}
.gr-une__card:hover { border-color: var(--gr-brass); }
.gr-une__card strong { font-family: var(--gr-font-title); font-size: 21px; font-weight: 700; text-transform: uppercase; line-height: 1.05; padding-right: 96px; }
.gr-une__tag {
	position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 3px;
	font-family: var(--gr-font-title); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	background: var(--gr-brass); color: #fff;
}
.gr-une__card.is-sponsor .gr-une__tag { background: var(--gr-ink); }
.gr-une__why { font-size: 14px; font-weight: 600; color: var(--gr-ink-2); }
.gr-une__lot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--gr-brass); }

/* Bouton « Me recentrer » sous le zoom */
.gr-ctrl-moi button { display: flex; align-items: center; justify-content: center; color: var(--gr-ink); }
.gr-ctrl-moi button.is-on { color: #2C5A86; }
.gr-ctrl-moi button.is-loading svg { animation: gr-pulse 1s ease-in-out infinite; }
@keyframes gr-pulse { 50% { opacity: .3; } }
@media (pointer: coarse) { .gr-map-wrap .maplibregl-ctrl-group button { width: 40px; height: 40px; } }

/* Derniers résultats dans la fiche du golf */
.gr-res-list { display: flex; flex-direction: column; gap: 6px; }
.gr-res { border: 1px solid var(--gr-line); border-radius: var(--gr-radius); background: var(--gr-surface); overflow: hidden; }
.gr-res__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; background: none; text-align: left; cursor: pointer; font-family: var(--gr-font); color: var(--gr-ink); }
.gr-res__btn > span { display: flex; flex-direction: column; gap: 2px; }
.gr-res__btn b { padding: 1px 6px; border-radius: 3px; color: #fff; font-family: var(--gr-font-title); font-size: 13px; }
.gr-res__btn[aria-expanded="true"] { background: var(--gr-card); border-bottom: 1px solid var(--gr-line); }
.gr-res-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gr-res-table th { padding: 6px 12px; text-align: left; font-family: var(--gr-font-title); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--gr-muted); }
.gr-res-table td { padding: 5px 12px; border-top: 1px solid var(--gr-line); }
.gr-res-table td:first-child { width: 40px; font-family: var(--gr-font-title); font-weight: 700; font-size: 15px; }
.gr-res-table tr.is-podium td:first-child { color: var(--gr-brass); }
.gr-res .gr-small { padding: 0 12px 10px; margin: 6px 0 0; }
.gr-res-table tr.gr-res-serie th { padding-top: 10px; color: var(--gr-brass); border-top: 1px solid var(--gr-line); }
.gr-res-table tbody:first-of-type tr.gr-res-serie th { border-top: 0; }
