/*
 * **Une seule feuille pour les deux paquets.** Certaines règles habillent des
 * vues que l'extension payante apporte : elles restent ici parce qu'un club
 * qui achète ne doit pas recharger une seconde feuille, et parce que deux
 * fichiers à tenir en accord finiraient par diverger. Ce sont des règles, pas
 * une porte : elles ne nomment aucun palier et ne refusent rien.
 */
/**
 * Aviation Weather METAR TAF — styles des widgets publics.
 *
 * Carte météo auto-portante (claire par défaut, variante .aero-weather-dark), inspirée
 * des apps pilotes. Identité WPTechnology : accent ambre discret, données en
 * mono, couleurs de catégorie de vol comme signature. Polices SYSTÈME (perf).
 * Scoppé sous les classes du plugin pour cohabiter avec n'importe quel thème.
 */

.aero-weather-decoded,
.aero-weather-panel,
.aero-weather-raw,
.aero-weather-compact {
	--wx-ink:#161b22; --wx-muted:#69737d; --wx-faint:#98a2ac;
	--wx-surface:#fff; --wx-border:#dfe3e8; --wx-line:#e8ebee; --wx-accent:#d94f1a;
	--wx-sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
	--wx-mono:ui-monospace,SFMono-Regular,Menlo,"Cascadia Mono","Courier New",monospace;
}
.aero-weather-decoded *, .aero-weather-panel * { box-sizing:border-box; }

/* ---- Catégories de vol (signature) ---- */
.aero-weather-badge {
	display:inline-flex; align-items:center; gap:5px;
	font-family:var(--wx-sans); font-size:12px; font-weight:600; line-height:1;
	padding:4px 9px; border-radius:5px; white-space:nowrap;
}
.aero-weather-badge-vfr  { color:#1C8C58; background:rgba(28,140,88,.12); }
.aero-weather-badge-mvfr { color:#B07A00; background:rgba(176,122,0,.14); }
.aero-weather-badge-ifr  { color:#C5453B; background:rgba(197,69,59,.12); }
.aero-weather-badge-lifr { color:#9B2C2C; background:rgba(155,44,44,.14); }

/* ---- Brut ---- */
.aero-weather-raw {
	font-family:var(--wx-mono); font-size:12.5px; line-height:1.6;
	color:var(--wx-muted); word-break:break-word; white-space:pre-wrap;
}

/* ---- Compact (barre de nav / header) ---- */
.aero-weather-compact {
	font-family:var(--wx-mono); font-size:12px; white-space:nowrap; color:var(--wx-ink);
}

/* ---- Donnée individuelle inline ---- */
.aero-weather-data { font-family:var(--wx-mono); font-weight:500; color:var(--wx-ink); }

/* ---- Carte décodée ---- */
.aero-weather-decoded {
	font-family:var(--wx-sans); color:var(--wx-ink); background:var(--wx-surface);
	border:1px solid var(--wx-border); border-radius:10px;
	max-width:400px; overflow:hidden;
	box-shadow:0 1px 2px rgba(20,24,29,.04);
}
.aero-weather-decoded-head {
	display:flex; align-items:center; justify-content:space-between; gap:10px;
	padding:13px 16px 9px;
}
.aero-weather-decoded-station { font-weight:700; font-size:15px; letter-spacing:-.01em; }
.aero-weather-decoded-meta {
	padding:0 16px 11px; font-family:var(--wx-mono); font-size:11.5px;
	color:var(--wx-faint); border-bottom:1px solid var(--wx-line);
}
.aero-weather-decoded-meta .aero-weather-auto {
	margin-left:6px; padding:1px 5px; border-radius:3px;
	background:var(--wx-line); color:var(--wx-muted); font-size:10px; letter-spacing:.04em;
}
.aero-weather-decoded-row { display:flex; align-items:baseline; gap:12px; padding:9px 16px; }
.aero-weather-decoded-row + .aero-weather-decoded-row { border-top:1px solid var(--wx-line); }
.aero-weather-decoded-label {
	flex:0 0 104px; font-size:11px; font-weight:600; text-transform:uppercase;
	letter-spacing:.05em; color:var(--wx-muted);
}
.aero-weather-decoded-value { font-weight:500; font-variant-numeric:tabular-nums; }

/* ---- Panneau (carte + onglets TAF/METAR) ---- */
.aero-weather-panel {
	font-family:var(--wx-sans); color:var(--wx-ink); background:var(--wx-surface);
	border:1px solid var(--wx-border); border-radius:10px; overflow:hidden; max-width:440px;
	box-shadow:0 1px 2px rgba(20,24,29,.04);
}
.aero-weather-panel-header {
	display:flex; align-items:center; justify-content:space-between; gap:12px;
	padding:13px 16px; border-bottom:1px solid var(--wx-line);
}
.aero-weather-panel-title { font-weight:700; font-size:14px; letter-spacing:-.01em; }
.aero-weather-panel-icao { font-family:var(--wx-mono); font-size:12px; color:var(--wx-faint); }
.aero-weather-panel-body { padding:16px; }
.aero-weather-panel-tabs { display:flex; gap:18px; margin-bottom:14px; border-bottom:1px solid var(--wx-line); }
.aero-weather-panel-tab {
	appearance:none; background:transparent; border:0; cursor:pointer;
	font-family:var(--wx-sans); font-size:12px; font-weight:600; text-transform:uppercase;
	letter-spacing:.06em; color:var(--wx-faint); padding:0 0 8px; position:relative;
}
.aero-weather-panel-tab.active { color:var(--wx-ink); }
.aero-weather-panel-tab.active::after {
	content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px;
	background:var(--wx-accent); border-radius:2px;
}
.aero-weather-panel-tab:hover:not(.active) { color:var(--wx-muted); }
.aero-weather-panel-data { border-radius:8px; }
.aero-weather-panel-content { display:none; }
.aero-weather-panel-content.active { display:block; }
.aero-weather-panel-footer {
	display:flex; align-items:center; gap:14px; margin-top:14px;
	padding-top:12px; border-top:1px solid var(--wx-line); font-size:12px; color:var(--wx-faint);
}

/* ---- Âge / erreur / disclaimer / upsell ---- */
.aero-weather-age { font-family:var(--wx-mono); font-size:11.5px; color:var(--wx-faint); }
.aero-weather-age-fresh { color:#1C8C58; }
.aero-weather-error { font-size:13px; font-style:italic; color:var(--wx-muted); }
.aero-weather-disclaimer { margin:8px 0 0; font-size:11px; line-height:1.5; color:var(--wx-faint); }
.aero-weather-upsell { font-size:11.5px; color:var(--wx-accent); text-decoration:underline; }

/* ---- Pastille live ---- */
.aero-weather-live-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#1C8C58; animation:aero-weather-pulse 2s ease-in-out infinite; }
@keyframes aero-weather-pulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }

/* ---- Variante sombre ---- */
.aero-weather-dark.aero-weather-decoded, .aero-weather-dark.aero-weather-panel,
.aero-weather-dark.aero-weather-raw, .aero-weather-dark.aero-weather-compact, .aero-weather-dark.aero-weather-badge,
.aero-weather-dark .aero-weather-decoded, .aero-weather-dark .aero-weather-panel {
	--wx-ink:#E6E9ED; --wx-muted:#9AA3AD; --wx-faint:#6B7480;
	--wx-surface:#161b22; --wx-border:#2A313A; --wx-line:#222A33;
}

/* ---- Paliers de fraicheur de la donnee ---- */
.aero-weather-age-aging { color: #B26A00; }
.aero-weather-age-stale { color: #B3261E; font-weight: 600; }
.aero-weather-age-warn  { font-size: .85em; color: #B3261E; }

/* ---- Station (aérodrome) ---- */
.aero-weather-station { max-width:400px; }

/* ---- Logo club ---- */
.aero-weather-panel-logo { height:20px; width:auto; max-width:120px; object-fit:contain; }

/* ---- Icône météo ---- */
.aero-weather-icon{color:var(--wx-accent);vertical-align:middle}

/* ---- Bandeau défilant multi-aérodromes ---- */
.aero-weather-ticker { overflow:hidden; white-space:nowrap; border-top:1px solid var(--wx-line); border-bottom:1px solid var(--wx-line); }
.aero-weather-ticker-track { display:inline-block; padding:8px 0; animation:aero-weather-ticker 40s linear infinite; }
.aero-weather-ticker-item { display:inline-flex; align-items:center; gap:8px; margin:0 28px; }
@keyframes aero-weather-ticker { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) { .aero-weather-ticker-track { animation:none; } }

/* ---- Plancher qualité ---- */
@media (max-width:420px){ .aero-weather-decoded, .aero-weather-panel { max-width:100%; } }
@media (prefers-reduced-motion:reduce){ .aero-weather-live-dot { animation:none; } }

/* ---- Skins Pro (club / école / FBO) ---- */
.aero-weather-skin-club { --wx-accent:#1C5BAA; }
.aero-weather-skin-ecole { --wx-accent:#1A7F37; }
.aero-weather-skin-fbo { --wx-accent:#6B4FBB; }
.aero-weather-skin-fbo.aero-weather-panel, .aero-weather-skin-club.aero-weather-panel, .aero-weather-skin-ecole.aero-weather-panel { border-radius:14px; }

/* ---- Feu tricolore des seuils du club ---- */
.aero-weather-minima { max-width:360px; border:1px solid var(--wx-border); border-radius:10px; padding:12px 14px; background:var(--wx-surface); font-family:var(--wx-sans); color:var(--wx-ink); }
.aero-weather-minima-head { display:flex; align-items:center; gap:8px; font-weight:600; }
.aero-weather-minima-state { margin-left:auto; }
.aero-weather-minima-dot { width:12px; height:12px; border-radius:50%; background:#8A929C; }
.aero-weather-minima-green .aero-weather-minima-dot { background:#1C8C58; }
.aero-weather-minima-orange .aero-weather-minima-dot { background:#B26A00; }
.aero-weather-minima-red .aero-weather-minima-dot { background:#B3261E; }
.aero-weather-minima-breaches { margin:8px 0 0; padding-left:18px; font-size:13px; }
.aero-weather-minima-breaches .aero-weather-minima-orange { color:#B26A00; }
.aero-weather-minima-breaches .aero-weather-minima-red { color:#B3261E; }

/* ---- Go/No-Go de la journée ---- */
.aero-weather-gng { max-width:380px; border:1px solid var(--wx-border); border-radius:10px; padding:12px 14px; background:var(--wx-surface); font-family:var(--wx-sans); color:var(--wx-ink); }
.aero-weather-gng-head { display:flex; align-items:center; gap:8px; font-weight:600; padding-bottom:8px; border-bottom:1px solid var(--wx-line); }
.aero-weather-gng-title { font-weight:700; }
.aero-weather-gng-head .aero-weather-gng-state { margin-left:auto; }
.aero-weather-gng-list { list-style:none; margin:8px 0 0; padding:0; }
.aero-weather-gng-row { display:flex; align-items:center; gap:8px; padding:5px 0; font-size:13px; }
.aero-weather-gng-row .aero-weather-gng-state { margin-left:auto; color:var(--wx-muted); }
.aero-weather-gng-dot { width:11px; height:11px; border-radius:50%; background:#8A929C; flex:0 0 auto; }
.aero-weather-gng-green .aero-weather-gng-dot { background:#1C8C58; }
.aero-weather-gng-orange .aero-weather-gng-dot { background:#B26A00; }
.aero-weather-gng-red .aero-weather-gng-dot { background:#B3261E; }

/* ---- Tableau multi-aérodromes ---- */
.aero-weather-table { border-collapse:collapse; width:100%; max-width:520px; font-family:var(--wx-sans); color:var(--wx-ink); }
.aero-weather-table th, .aero-weather-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--wx-line); vertical-align:middle; }
.aero-weather-table th[scope=row] { font-family:var(--wx-mono); font-weight:600; }

/* ---- Frise du TAF ---- */
.aero-weather-tl { display:flex; flex-wrap:wrap; gap:4px; max-width:520px; font-family:var(--wx-sans); }
.aero-weather-tl-seg { flex:1 1 90px; min-width:90px; border-radius:6px; padding:8px 10px; display:flex; flex-direction:column; gap:2px; }
.aero-weather-tl-label { font-size:11px; }
.aero-weather-tl-cat { font-size:13px; font-weight:700; }

/* ---- Écran du club-house ---- */
.aero-weather-tv { position:relative; min-height:240px; }
.aero-weather-tv-slide { display:none; }
.aero-weather-tv-slide.is-active { display:block; }
.aero-weather-tv .aero-weather-panel { max-width:none; font-size:1.15em; }

/* ---- Vue élève annotée ---- */
.aero-weather-student { max-width:420px; }
.aero-weather-student-row { padding:10px 16px; border-top:1px solid var(--wx-line); }
.aero-weather-student-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.aero-weather-student-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--wx-muted); }
.aero-weather-student-value { font-weight:600; font-variant-numeric:tabular-nums; }
.aero-weather-student-note { margin:4px 0 0; font-size:12px; line-height:1.45; color:var(--wx-faint); }
