/* Groupe Sud IPSL: standalone page in the visual style of ipsl.fr (Poppins, the "home" theme colours). */
:root {
  --dominante: #0a465e;   /* ipsl.fr home theme */
  --nuance-1: #1c9390;
  --nuance-2: #0db9b5;
  --nuance-3: #eeeeee;
  --text: #333333;
  --text-soft: #6b7780;
  --line: #e2e6e8;
  --font: Poppins, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #ffffff; color: var(--text); font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.6; }
a { color: var(--nuance-1); }
a:hover { color: var(--dominante); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--nuance-2); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bands in the dominant colour, as on ipsl.fr */
.topband, .footband { background: var(--dominante); color: #ffffff; }
.topband-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { color: #ffffff; text-decoration: none; font-weight: 500; font-size: 18px; }
.lang { display: flex; gap: 2px; }
.lang button { border: 1px solid transparent; background: none; color: #ffffff; opacity: .7; padding: 3px 10px; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { opacity: 1; border-color: #ffffff; }

.intro { padding-top: 40px; padding-bottom: 8px; }
h1 { margin: 0 0 12px; color: var(--dominante); font-weight: 300; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; }
.lead { max-width: 820px; margin: 0; font-size: 17px; color: var(--text); }
.lead strong { color: var(--dominante); font-weight: 600; }

/* Globe and side column */
.explorer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; padding-top: 28px; padding-bottom: 48px; align-items: start; }
.stage { position: sticky; top: 16px; }
.globe-wrap { position: relative; }
#globe { display: block; width: min(100%, calc(100vh - 150px)); aspect-ratio: 1; margin: 0 auto; cursor: grab; touch-action: none; }
#globe.dragging { cursor: grabbing; }
#globe.over-country { cursor: pointer; }
.tooltip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); padding: 5px 10px; background: var(--dominante); color: #ffffff; font-size: 13px; white-space: nowrap; }
.globe-controls { position: absolute; right: 0; bottom: 4%; display: flex; flex-direction: column; gap: 4px; }
.globe-controls button { width: 34px; height: 34px; border: 0; background: var(--dominante); color: #ffffff; font-size: 17px; cursor: pointer; }
.globe-controls button:hover { background: var(--nuance-1); }
.hint { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--text-soft); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--text-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 10px; }

.side { min-width: 0; }
.search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #ffffff; font: inherit; color: var(--text); }
.search input:focus { outline: none; border-color: var(--nuance-2); }
.filter-name { margin: 16px 0 6px; font-size: 13px; font-weight: 500; color: var(--dominante); }
.toggles { display: flex; flex-wrap: wrap; gap: 4px; }
.toggles button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #ffffff; color: var(--text); padding: 3px 10px; font-size: 13px; cursor: pointer; }
.toggles button:hover { border-color: var(--nuance-1); color: var(--nuance-1); }
.toggles button[aria-pressed="true"] { background: var(--dominante); border-color: var(--dominante); color: #ffffff; }
.toggles i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

.panel { margin-top: 24px; border-top: 3px solid var(--dominante); padding-top: 14px; }
.panel h2 { margin: 0 0 2px; color: var(--dominante); font-weight: 400; font-size: 26px; line-height: 1.25; }
.panel .context { margin: 0 0 8px; font-size: 14px; color: var(--text-soft); }
.panel .figures { margin: 0 0 12px; }
.panel .figures b { color: var(--nuance-1); font-weight: 600; font-size: 20px; }
.panel .back { border: 0; background: none; padding: 0; margin: 0 0 8px; color: var(--nuance-1); font-size: 14px; cursor: pointer; text-decoration: underline; }
.panel h3 { margin: 16px 0 4px; color: var(--dominante); font-size: 15px; font-weight: 500; }
.panel .note { color: var(--text-soft); }
.panel .filter { width: 100%; margin: 4px 0; padding: 7px 10px; border: 1px solid var(--line); font: inherit; font-size: 14px; }

.ranking, .people { list-style: none; margin: 0 0 8px; padding: 0; }
.ranking button { display: grid; grid-template-columns: minmax(0, 1fr) 38% 2.5em; align-items: center; gap: 12px; width: 100%; padding: 7px 0; border: 0; border-bottom: 1px solid var(--nuance-3); background: none; color: var(--text); text-align: left; cursor: pointer; }
.ranking button:hover .name { color: var(--nuance-1); }
.ranking .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .bar { height: 8px; background: var(--nuance-3); }
.ranking .bar i { display: block; height: 100%; background: var(--nuance-2); }
.ranking .num { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

.people > li { padding: 9px 0; border-bottom: 1px solid var(--nuance-3); }
.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: baseline; }
.person a { color: var(--text); font-weight: 500; text-decoration: none; }
.person a:hover { color: var(--nuance-1); text-decoration: underline; }
.person .count { font-size: 13px; color: var(--text-soft); }
.person .lab { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-soft); }
.person .lab i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.people details { margin-top: 2px; font-size: 13px; }
.people summary { cursor: pointer; color: var(--nuance-1); }
.people details ol { margin: 4px 0 0; padding-left: 18px; }
.people details li { padding: 2px 0; }
.people .year { color: var(--text-soft); }

/* Method, on the light grey of the IPSL palette */
.method { background: var(--nuance-3); padding: 40px 0 44px; }
.method h2 { margin: 0 0 16px; color: var(--dominante); font-weight: 300; font-size: 28px; }
.method-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; font-size: 15px; }
.method-body > p { margin: 0; }
.method dl { margin: 0; }
.method dt { color: var(--dominante); font-weight: 500; }
.method dd { margin: 0 0 10px; }

.footband-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 18px; padding-bottom: 18px; font-size: 14px; }
.footband p { margin: 0; }
.footband a { color: #ffffff; }

@media (max-width: 960px) {
  .explorer { grid-template-columns: 1fr; gap: 24px; }
  .stage { position: static; }
  #globe { width: 100%; }
  .method-body { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .intro { padding-top: 28px; }
}
