/* WF Apnéa — carte des spots */
.wfa {
	--wfa-bg: #07111f;
	--wfa-panel: #0e1b2e;
	--wfa-line: rgba(148, 197, 255, .14);
	--wfa-text: #e8f1fb;
	--wfa-muted: #8fa6c1;
	--wfa-accent: #22c3e6;
	--wfa-accent2: #f59e0b;
	--wfa-pub: #3b82f6;
	--wfa-bad: #f87171;
	--wfa-radius: 12px;
	--wfa-map-h: 620px;
	color: var(--wfa-text);
	background: var(--wfa-bg);
	border-radius: var(--wfa-radius);
	padding: 12px;
	font-size: 15px;
	line-height: 1.45;
	box-sizing: border-box;
}
.wfa *, .wfa *::before, .wfa *::after { box-sizing: inherit; }
.wfa [hidden] { display: none !important; }

.wfa-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.wfa-select {
	flex: 1 1 180px; min-height: 46px; max-width: 100%; padding: 0 12px;
	background: var(--wfa-panel); color: var(--wfa-text);
	border: 1px solid var(--wfa-line); border-radius: calc(var(--wfa-radius) - 2px); font: inherit;
}
.wfa-select--spot { flex-basis: 260px; }
.wfa-select:disabled { opacity: .5; }
.wfa-count { color: var(--wfa-muted); font-size: 13px; padding: 0 4px; white-space: nowrap; }

.wfa-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 16px; font: inherit; font-weight: 600; line-height: 1.2;
	color: var(--wfa-text); background: transparent; text-decoration: none; cursor: pointer;
	border: 1px solid var(--wfa-line); border-radius: calc(var(--wfa-radius) - 2px);
	transition: background-color .15s, border-color .15s, color .15s;
}
.wfa-btn:hover, .wfa-btn:focus-visible { border-color: var(--wfa-accent); color: var(--wfa-text); }
.wfa-btn:focus-visible, .wfa-select:focus-visible, .wfa-form :focus-visible { outline: 2px solid var(--wfa-accent); outline-offset: 2px; }
.wfa-btn:disabled { opacity: .45; cursor: not-allowed; }
.wfa-btn--primary { background: var(--wfa-accent); border-color: var(--wfa-accent); color: #04121c; }
.wfa-btn--primary:hover, .wfa-btn--primary:focus-visible { background: #5fd6f0; color: #04121c; }
.wfa-btn--danger { color: var(--wfa-bad); border-color: rgba(248, 113, 113, .4); }
.wfa-btn--danger:hover { border-color: var(--wfa-bad); color: var(--wfa-bad); }
.wfa-btn--ghost { border-color: transparent; padding: 0 10px; color: var(--wfa-muted); }
.wfa-btn--sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.wfa-bar > .wfa-btn { margin-left: auto; }

.wfa-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 12px; }
.wfa-mapwrap { position: relative; min-width: 0; }
.wfa-map { height: var(--wfa-map-h); border-radius: calc(var(--wfa-radius) - 2px); overflow: hidden; background: #0b2233; z-index: 0; }
.wfa-map.is-placing { cursor: crosshair; }
.wfa-legend {
	position: absolute; left: 10px; bottom: 10px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px;
	padding: 6px 8px; background: rgba(7, 17, 31, .82); border-radius: 10px; font-size: 12px; color: var(--wfa-text);
}
.wfa-panel {
	min-width: 0; max-height: var(--wfa-map-h); overflow: auto; padding: 18px;
	background: var(--wfa-panel); border: 1px solid var(--wfa-line); border-radius: calc(var(--wfa-radius) - 2px);
}
@media (max-width: 899px) {
	.wfa-body { grid-template-columns: 1fr; }
	.wfa-map { height: min(var(--wfa-map-h), 62vh); }
	.wfa-panel { max-height: none; }
	.wfa-bar > .wfa-btn { margin-left: 0; flex: 1 1 100%; }
}

/* Repères */
.wfa-pin { background: none; border: 0; }
.wfa-pin span {
	display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: 16px;
	background: var(--wfa-accent, #22c3e6); border: 2px solid #fff; border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .35); position: relative; transition: transform .15s;
}
.wfa-pin span::after {
	content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -6px;
	border: 6px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.wfa-pin--pub span { background: var(--wfa-pub, #3b82f6); }
.wfa-pin--mine span { background: var(--wfa-accent2, #f59e0b); }
.wfa-pin--draft span { background: #fff; color: #07111f; font-weight: 700; }
.wfa-pin.is-sel span { transform: scale(1.22); box-shadow: 0 0 0 4px rgba(34, 195, 230, .45), 0 6px 14px rgba(0, 0, 0, .4); }
.wfa-cluster span {
	display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
	background: #07111f; color: #fff; font-weight: 700; font-size: 14px;
	border: 2px solid var(--wfa-accent, #22c3e6); border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
.wfa-cluster.is-sel span { border-color: var(--wfa-accent2, #f59e0b); }

/* Panneau */
.wfa-empty { color: var(--wfa-muted); display: grid; gap: 8px; }
.wfa-empty strong { color: var(--wfa-text); font-size: 17px; }
.wfa-empty p { margin: 0; }
.wfa-toast { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(34, 195, 230, .12); color: var(--wfa-text); font-size: 14px; }
.wfa-toast.is-bad { background: rgba(248, 113, 113, .14); }
.wfa-head { display: grid; gap: 6px; margin-bottom: 12px; justify-items: start; }
.wfa .wfa-title { margin: 0; font-size: 22px; line-height: 1.2; color: var(--wfa-text); overflow-wrap: anywhere; }
.wfa-sub { margin: 0; color: var(--wfa-muted); font-size: 14px; }
.wfa-chip { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); }
.wfa-chip--ref { background: rgba(34, 195, 230, .16); }
.wfa-chip--pub, .wfa-chip--approved { background: rgba(59, 130, 246, .2); }
.wfa-chip--private { background: rgba(245, 158, 11, .18); }
.wfa-chip--pending { background: rgba(245, 158, 11, .32); }
.wfa-chip--rejected { background: rgba(248, 113, 113, .2); }
.wfa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.wfa-actions .wfa-btn { flex: 1 1 140px; }
.wfa-share { display: grid; gap: 10px; padding: 12px; margin-bottom: 14px; border: 1px solid var(--wfa-line); border-radius: 10px; }
.wfa-note { margin: 0; color: var(--wfa-muted); font-size: 14px; }
.wfa-note.is-bad { color: var(--wfa-bad); }
.wfa-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.wfa-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--wfa-accent); }
.wfa-gps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--wfa-muted); }
.wfa-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.wfa-facts div { padding: 10px; background: rgba(255, 255, 255, .04); border-radius: 10px; }
.wfa-facts dt { font-size: 12px; color: var(--wfa-muted); }
.wfa-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.wfa-text { margin: 0 0 12px; }
.wfa .wfa-text h4, .wfa .wfa-wx h4 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--wfa-muted); }
.wfa-text p { margin: 0; white-space: pre-line; }
.wfa-by { color: var(--wfa-muted); font-size: 13px; }

.wfa-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.wfa-list__item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; min-height: 56px; }
.wfa-list__t { font-weight: 700; }
.wfa-list__m { grid-column: 1; color: var(--wfa-muted); font-size: 13px; font-weight: 400; }
.wfa-list__item .wfa-chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* Météo */
.wfa-wx { border-top: 1px solid var(--wfa-line); padding-top: 14px; margin-top: 6px; }
.wfa-seg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--wfa-line); border-radius: 10px; overflow: hidden; margin: 8px 0 10px; }
.wfa-seg .wfa-btn { min-width: 0; min-height: 44px; padding: 0 2px; border: 0; border-radius: 0; font-size: 12px; white-space: normal; text-align: center; }
.wfa-seg .wfa-btn + .wfa-btn { border-left: 1px solid var(--wfa-line); }
.wfa-seg .wfa-btn.is-on { background: var(--wfa-accent); color: #04121c; }
.wfa-wx__out { font-size: 14px; color: var(--wfa-muted); }
.wfa-wx__sum { display: grid; gap: 4px; margin-bottom: 10px; color: var(--wfa-text); }
.wfa-wx__best { color: var(--wfa-accent); font-weight: 600; }
.wfa-wx__t { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--wfa-text); }
.wfa-wx__t th, .wfa-wx__t td { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--wfa-line); background: none; }
.wfa-wx__t th { color: var(--wfa-muted); font-weight: 600; }
.wfa-fine { margin: 10px 0 0; font-size: 12px; color: var(--wfa-muted); }

/* Formulaire */
.wfa-form { display: grid; gap: 12px; }
.wfa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wfa-field { display: grid; gap: 4px; min-width: 0; }
.wfa-field--wide { grid-column: 1 / -1; }
.wfa-field label { font-size: 13px; color: var(--wfa-muted); }
.wfa-form input, .wfa-form select, .wfa-form textarea {
	width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: var(--wfa-text);
	background: var(--wfa-bg); border: 1px solid var(--wfa-line); border-radius: 8px;
}
.wfa-form textarea { min-height: 80px; resize: vertical; }
.wfa-place { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--wfa-muted); }

.wfa-gate { display: grid; gap: 12px; padding: 24px; text-align: center; justify-items: center; }
.wfa-gate p { margin: 0; font-size: 17px; }
.wfa-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.wfa .leaflet-control-layers, .wfa .leaflet-bar a { color: #07111f; }

/* Comptes et profil */
.wfa-card { max-width: 560px; margin-inline: auto; padding: 20px; display: grid; gap: 14px; }
.wfa-profile { max-width: 760px; }
.wfa-seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.wfa-seg--2 .wfa-btn { font-size: 15px; min-height: 48px; text-decoration: none; }
.wfa-me { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wfa-me > div:first-of-type { flex: 1 1 160px; min-width: 0; }
.wfa-me .wfa-title { font-size: 19px; }
.wfa-me .wfa-sub { overflow-wrap: anywhere; }
.wfa-card > .wfa-me .wfa-row { justify-content: flex-start; }
.wfa .wfa-avatar { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; background: var(--wfa-panel); }
.wfa-profile .wfa-avatar { width: 72px; height: 72px; }
.wfa-alert { padding: 12px 14px; border-radius: 10px; background: rgba(34, 195, 230, .14); border: 1px solid rgba(34, 195, 230, .35); }
.wfa-alert.is-bad { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); }
.wfa-alert p { margin: 0; }
.wfa-alert p + p { margin-top: 4px; }
.wfa-help { color: var(--wfa-muted); font-size: 12px; }
.wfa-label, .wfa-photo legend { font-size: 13px; color: var(--wfa-muted); padding: 0; }
.wfa-photo { border: 0; margin: 0; padding: 0; }
.wfa-form input[type=file] { padding: 10px; }
.wfa-form input[type=checkbox] { width: 20px; min-height: 0; height: 20px; padding: 0; }
.wfa-btn--block { width: 100%; min-height: 50px; }
.wfa-link { color: var(--wfa-accent); font-size: 14px; justify-self: center; }
.wfa-pass { position: relative; }
.wfa-pass input { padding-right: 96px; }
.wfa-pass .wfa-btn { position: absolute; right: 2px; top: 2px; bottom: 2px; min-height: 0; }
.wfa-meter { height: 4px; border-radius: 4px; background: var(--wfa-line); overflow: hidden; }
.wfa-meter span { display: block; height: 100%; width: 0; transition: width .2s, background-color .2s; }
.wfa-meter[data-level="0"] span, .wfa-meter[data-level="1"] span { width: 25%; background: var(--wfa-bad); }
.wfa-meter[data-level="2"] span { width: 55%; background: var(--wfa-accent2); }
.wfa-meter[data-level="3"] span { width: 80%; background: var(--wfa-accent); }
.wfa-meter[data-level="4"] span { width: 100%; background: #34d399; }
.wfa-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wfa-progress { padding: 10px 12px; border-radius: 10px; background: rgba(245, 158, 11, .12); color: var(--wfa-text); }
.wfa-progress.is-ok { background: rgba(52, 211, 153, .12); }
.wfa-range { padding: 0 !important; accent-color: var(--wfa-accent); }
.wfa-ac { position: relative; }
.wfa-ac__list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--wfa-panel); border: 1px solid var(--wfa-line); border-radius: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.wfa-ac__list li { padding: 10px 12px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.wfa-ac__list li:hover, .wfa-ac__list li.is-on { background: rgba(34, 195, 230, .16); }
.wfa-fold { border: 1px solid var(--wfa-line); border-radius: 10px; padding: 0 14px; }
.wfa-fold > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.wfa-fold[open] { padding-bottom: 14px; }
.wfa-fold--danger > summary { color: var(--wfa-bad); }
@media (max-width: 599px) {
	.wfa-grid { grid-template-columns: 1fr; }
	.wfa-card { padding: 16px; }
}

/* Sorties et binômes */
.wfa-outings, .wfa-buddies { max-width: 820px; }
.wfa-seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.wfa-seg--3 .wfa-btn { font-size: 14px; min-height: 48px; text-decoration: none; }
.wfa-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.wfa-filters label { display: grid; gap: 4px; font-size: 13px; color: var(--wfa-muted); flex: 1 1 160px; }
.wfa-filters .wfa-btn { flex: 0 0 auto; }
.wfa-olist { display: grid; gap: 10px; margin-top: 4px; }
.wfa-ocard { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; color: var(--wfa-text); text-decoration: none; border: 1px solid var(--wfa-line); border-radius: 12px; background: rgba(255, 255, 255, .02); transition: border-color .15s, background-color .15s; }
.wfa-ocard:hover, .wfa-ocard:focus-visible { border-color: var(--wfa-accent); background: rgba(34, 195, 230, .05); color: var(--wfa-text); }
.wfa-ocard__date { display: grid; align-content: start; justify-items: center; padding: 8px 4px; border-radius: 10px; background: var(--wfa-bg); text-align: center; line-height: 1.2; }
.wfa-ocard__date strong { font-size: 26px; color: var(--wfa-accent); }
.wfa-ocard__date small { font-size: 12px; color: var(--wfa-muted); }
.wfa-ocard__main { display: grid; gap: 6px; min-width: 0; }
.wfa-ocard__t { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.wfa-ocard__s { color: var(--wfa-muted); font-size: 14px; }
.wfa-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wfa-chip--plain { background: rgba(255, 255, 255, .07); font-weight: 500; }
.wfa-chip--me { background: rgba(34, 195, 230, .2); }
.wfa-chip--hot { background: var(--wfa-accent2); color: #1a1000; }
.wfa-chip--bad { background: rgba(248, 113, 113, .22); }
.wfa-member { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.wfa-member > span { display: grid; min-width: 0; }
.wfa-member small { color: var(--wfa-muted); font-size: 12px; }
.wfa .wfa-avatar--sm { width: 40px; height: 40px; border-radius: 10px; }
.wfa-ohead { display: grid; gap: 4px; justify-items: start; }
.wfa-ohead .wfa-link { justify-self: start; }
.wfa-ohead .wfa-title { font-size: 22px; }
.wfa-orow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.wfa-people { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.wfa-people li { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--wfa-line); border-radius: 10px; }
.wfa-people .wfa-actions { margin: 0; }
.wfa-people .wfa-actions .wfa-btn, .wfa-people .wfa-actions form { flex: 0 1 auto; }
.wfa-actions > form { display: contents; }
.wfa-quote { margin: 0; color: var(--wfa-muted); font-size: 14px; font-style: italic; white-space: pre-line; }
.wfa-meet { padding: 12px; border-radius: 10px; background: rgba(34, 195, 230, .08); }
.wfa-msgs { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.wfa-msgs li { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); max-width: 85%; }
.wfa-msgs li.is-me { justify-self: end; background: rgba(34, 195, 230, .14); }
.wfa-msgs small { color: var(--wfa-muted); font-size: 12px; }
.wfa-msgs p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.wfa-bcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wfa-bcard { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--wfa-line); border-radius: 12px; }
.wfa-invite { display: flex; gap: 6px; }
.wfa-invite .wfa-select { flex: 1 1 auto; min-width: 0; min-height: 40px; font-size: 14px; }
.wfa-safety { font-size: 13px; padding-top: 4px; border-top: 1px solid var(--wfa-line); }
@media (max-width: 599px) {
	.wfa-ocard { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 12px; }
	.wfa-ocard__date strong { font-size: 22px; }
}
