/* ============================================================
   GÉGÉ SPORT — Surcouche « Warm » (ambre / espresso)
   À charger APRÈS gege.css : redéfinit les tokens en ambre
   (brief produit) et ajoute les styles Article + Athlète.
   Réutilise tous les composants .gs-* existants.
   ============================================================ */

/* ---- TOKENS light (ambre / crème) ---- */
.gs-app {
  --paper:#FBF6EE;
  --surface:#FFFFFF;
  --surface-2:#F4ECDD;
  --surface-3:#EADFCB;
  --inset:#F3EBDB;

  --ink:#2A2018;
  --ink-2:#73624E;
  --ink-3:#A4937C;
  --on-brand:#FFFFFF;

  --brand:#C8782A;
  --brand-strong:#A85F18;
  --brand-text:#A85F18;
  --brand-tint:rgba(200,120,42,0.12);
  --brand-tint-2:rgba(200,120,42,0.18);
  --brand-border:rgba(200,120,42,0.34);

  --live:#0F9FB8;
  --live-text:#0C7E92;
  --live-tint:rgba(15,159,184,0.13);
  --live-border:rgba(15,159,184,0.40);

  --up:#1F9D57; --up-text:#16894A; --up-tint:rgba(31,157,87,0.13);
  --down:#B5462F; --down-text:#9E3A26; --down-tint:rgba(181,70,47,0.12);
  --flat:#D98A1F; --flat-text:#9A6310; --flat-tint:rgba(217,138,31,0.16);

  --line:rgba(42,32,24,0.10);
  --line-soft:rgba(42,32,24,0.06);
  --line-strong:rgba(42,32,24,0.16);

  --dot:rgba(200,120,42,0.16);

  --shadow-sm:0 1px 2px rgba(58,40,20,0.05), 0 2px 8px -4px rgba(58,40,20,0.12);
  --shadow-md:0 6px 16px -8px rgba(58,40,20,0.20), 0 2px 6px -4px rgba(58,40,20,0.12);
  --shadow-lg:0 24px 60px -28px rgba(58,40,20,0.42);
  --glow:0 0 0 4px var(--brand-tint);
}

/* ---- TOKENS dark (espresso) ---- */
.gs-app[data-theme="dark"] {
  --paper:#1A1209;
  --surface:#241A10;
  --surface-2:#1F160D;
  --surface-3:#2F2113;
  --inset:#140D06;

  --ink:#F5EADC;
  --ink-2:#C3AF96;
  --ink-3:#8C7A61;

  --brand:#E0944A;
  --brand-strong:#C8782A;
  --brand-text:#EBAA6B;
  --brand-tint:rgba(224,148,74,0.18);
  --brand-tint-2:rgba(224,148,74,0.26);
  --brand-border:rgba(224,148,74,0.45);

  --live:#28C0DA; --live-text:#5DD7ED; --live-tint:rgba(40,192,218,0.16); --live-border:rgba(40,192,218,0.45);
  --up:#3BD07F; --up-text:#54E095; --up-tint:rgba(59,208,127,0.16);
  --down:#F0795E; --down-text:#FF9580; --down-tint:rgba(240,121,94,0.16);
  --flat:#F0AC4E; --flat-text:#FFC777; --flat-tint:rgba(240,172,78,0.18);

  --line:rgba(255,255,255,0.10);
  --line-soft:rgba(255,255,255,0.06);
  --line-strong:rgba(255,255,255,0.18);

  --dot:rgba(224,148,74,0.14);

  --shadow-sm:0 1px 2px rgba(0,0,0,0.4), 0 2px 10px -4px rgba(0,0,0,0.45);
  --shadow-md:0 8px 22px -10px rgba(0,0,0,0.6);
  --shadow-lg:0 30px 70px -30px rgba(0,0,0,0.75);
}

/* ============================================================
   PAGE ARTICLE
   ============================================================ */
.gs-article { max-width:760px; margin:0 auto; }
.gs-art-head { margin-top:10px; }
.gs-art-h1 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:32px; line-height:1.06; letter-spacing:-0.02em; margin:12px 0 0; text-wrap:balance; }
@container gsapp (min-width:780px){ .gs-art-h1 { font-size:40px; } }
.gs-art-byline { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px; font-size:12.5px; color:var(--ink-2); }
.gs-art-byline .who { display:flex; align-items:center; gap:8px; font-weight:700; color:var(--ink); }
.gs-art-cover { margin-top:18px; height:230px; border-radius:18px; background:
    radial-gradient(var(--dot) 1.6px, transparent 1.8px) 0 0 / 16px 16px,
    linear-gradient(135deg, var(--brand-tint-2), var(--surface-2)); border:1px solid var(--line);
  display:grid; place-items:center; font-size:64px; }

.gs-prose { font-size:16.5px; line-height:1.72; color:var(--ink); margin-top:22px; }
.gs-prose .lead { font-size:19px; line-height:1.5; font-weight:500; color:var(--ink); margin:0 0 20px; text-wrap:pretty; }
.gs-prose h2 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:21px; letter-spacing:-0.01em; margin:26px 0 9px; }
.gs-prose p { margin:0 0 17px; text-wrap:pretty; }

/* encart « le truc à retenir » (marge sur desktop) */
.gs-aside { background:var(--brand-tint); border:1px solid var(--brand-border); border-radius:16px; padding:14px 15px; margin:6px 0 18px; position:relative; }
.gs-aside .ah { display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.gs-aside .ah b { font-family:'Bricolage Grotesque'; font-weight:800; font-size:13px; color:var(--brand-text); }
.gs-aside p { font-size:14px; line-height:1.45; margin:0; text-wrap:pretty; }
@container gsapp (min-width:820px){
  .gs-aside { float:right; width:266px; margin:6px 0 14px 24px; }
}

/* bandeau brouillon */
.gs-draftbar { display:flex; align-items:center; gap:10px; background:var(--flat-tint); border:1px solid var(--flat); border-radius:12px; padding:11px 14px; font-size:13px; font-weight:600; color:var(--flat-text); margin-top:8px; }
.gs-draftbar b { font-family:'Bricolage Grotesque'; }

/* sources + liens */
.gs-sources { margin-top:26px; border-top:1px solid var(--line); padding-top:16px; }
.gs-sources h3 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:14px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-2); margin:0 0 8px; }
.gs-src { display:flex; align-items:center; gap:10px; padding:9px 2px; border-bottom:1px solid var(--line-soft); cursor:pointer; }
.gs-src:hover .nm { color:var(--brand-text); }
.gs-src .ico { color:var(--ink-3); flex-shrink:0; }
.gs-src .nm { font-weight:600; font-size:13.5px; }
.gs-src .url { font-family:'JetBrains Mono'; font-size:11px; color:var(--ink-3); margin-left:auto; }
.gs-linkcards { display:grid; gap:10px; margin-top:16px; }
@container gsapp (min-width:620px){ .gs-linkcards { grid-template-columns:1fr 1fr; } }
.gs-linkcard { display:flex; align-items:center; gap:11px; padding:12px 14px; cursor:pointer; }
.gs-linkcard .lc-ico { width:38px;height:38px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center;font-size:18px;flex-shrink:0;border:1px solid var(--line-soft); }
.gs-linkcard .lc-k { font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-3); }
.gs-linkcard .lc-n { font-family:'Bricolage Grotesque';font-weight:700;font-size:14px;line-height:1.15;margin-top:2px; }

/* ============================================================
   FICHE ATHLÈTE
   ============================================================ */
.gs-ath-hero { overflow:hidden; }
.gs-ath-top { display:flex; gap:16px; align-items:flex-start; padding:18px 18px 16px; background:linear-gradient(180deg,var(--brand-tint) 0%,transparent 90%); position:relative; }
.gs-ath-top::before { content:''; position:absolute; inset:0; background-image:radial-gradient(var(--dot) 1.5px,transparent 1.7px); background-size:15px 15px; opacity:.55; pointer-events:none; }
.gs-ath-top > * { position:relative; z-index:1; }
.gs-photo { width:88px;height:88px;border-radius:20px;flex-shrink:0;background:var(--surface-3);border:1px solid var(--line);display:grid;place-items:center;font-size:40px;overflow:hidden; }
@container gsapp (min-width:780px){ .gs-photo { width:108px;height:108px; } }
.gs-ath-id { flex:1; min-width:0; }
.gs-ath-id .nat { font-size:12.5px; font-weight:700; color:var(--ink-2); display:flex; align-items:center; gap:6px; }
.gs-ath-id h1 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:26px; line-height:1.04; letter-spacing:-0.02em; margin:4px 0 4px; text-wrap:balance; }
@container gsapp (min-width:780px){ .gs-ath-id h1 { font-size:32px; } }
.gs-ath-id .role { font-size:13px; color:var(--ink-2); }
.gs-ath-meta { display:flex; gap:8px 18px; flex-wrap:wrap; padding:0 18px 16px; font-size:12.5px; color:var(--ink-2); position:relative; z-index:1; }
.gs-ath-meta b { color:var(--ink); font-weight:700; }
.gs-ath-actions { display:flex; gap:8px; align-items:center; padding:0 18px 18px; flex-wrap:wrap; }

.gs-palm { display:flex; flex-direction:column; }
.gs-palm-row { display:flex; align-items:center; gap:12px; padding:11px 4px; border-bottom:1px solid var(--line-soft); }
.gs-palm-row:last-child { border-bottom:none; }
.gs-palm-row .medal { font-size:22px; flex-shrink:0; width:30px; text-align:center; }
.gs-palm-row .yr { font-family:'JetBrains Mono'; font-weight:700; font-size:12px; color:var(--brand-text); width:54px; flex-shrink:0; }
.gs-palm-row .t { font-size:14px; font-weight:600; }

.gs-resline { display:flex; align-items:center; gap:12px; padding:11px 4px; border-bottom:1px solid var(--line-soft); }
.gs-resline:last-child { border-bottom:none; }
.gs-resline .pos { font-family:'Bricolage Grotesque'; font-weight:800; font-size:15px; width:40px; flex-shrink:0; }
.gs-resline .pos.up { color:var(--up-text); }
.gs-resline .pos.flat { color:var(--flat-text); }
.gs-resline .pos.down { color:var(--down-text); }
.gs-resline .ev { flex:1; min-width:0; font-size:13.5px; font-weight:600; }
.gs-resline .rv { font-family:'JetBrains Mono'; font-size:12.5px; color:var(--ink-2); }

/* ============================================================
   SWITCH (toggle)
   ============================================================ */
.gs-switch { width:46px; height:28px; border-radius:999px; border:none; background:var(--surface-3); position:relative; cursor:pointer; flex-shrink:0; transition:background .16s; padding:0; }
.gs-switch.on { background:var(--brand); }
.gs-switch::after { content:''; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .18s cubic-bezier(.3,.8,.3,1.2); }
.gs-switch.on::after { transform:translateX(18px); }
.gs-prefrow { display:flex; align-items:center; gap:13px; padding:13px 4px; border-bottom:1px solid var(--line-soft); }
.gs-prefrow:last-child { border-bottom:none; }
.gs-prefrow .pr-ico { width:34px;height:34px;border-radius:9px;background:var(--surface-2);display:grid;place-items:center;font-size:16px;flex-shrink:0;border:1px solid var(--line-soft); }
.gs-prefrow .pr-t { font-weight:700; font-size:14px; }
.gs-prefrow .pr-d { font-size:12px; color:var(--ink-2); margin-top:1px; }

/* ============================================================
   ONBOARDING
   ============================================================ */
.gs-onb { height:100%; display:flex; flex-direction:column; background:
    radial-gradient(var(--dot) 1.6px, transparent 1.8px) 0 0 / 16px 16px, var(--paper); }
.gs-onb-bar { display:flex; gap:6px; padding:18px 20px 6px; }
.gs-safe .gs-onb-bar { padding-top:50px; }
.gs-onb-bar .seg { flex:1; height:5px; border-radius:999px; background:var(--surface-3); overflow:hidden; }
.gs-onb-bar .seg.done { background:var(--brand); }
.gs-onb-body { flex:1; overflow-y:auto; padding:14px 20px 10px; }
.gs-onb-foot { padding:14px 20px; border-top:1px solid var(--line); background:color-mix(in srgb,var(--surface) 80%,transparent); backdrop-filter:blur(8px); }
.gs-safe .gs-onb-foot { padding-bottom:30px; }
.gs-onb-hi { display:flex; flex-direction:column; align-items:center; text-align:center; padding-top:18px; }
.gs-onb-hi h1 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:27px; margin:18px 0 0; letter-spacing:-0.02em; text-wrap:balance; }
.gs-onb-hi .base { color:var(--brand-text); font-weight:700; font-family:'Bricolage Grotesque'; font-size:15px; margin-top:6px; }
.gs-onb-hi p { color:var(--ink-2); font-size:14.5px; line-height:1.5; margin:14px 4px 0; max-width:340px; text-wrap:pretty; }
.gs-onb-step-t { font-family:'Bricolage Grotesque'; font-weight:800; font-size:21px; letter-spacing:-0.01em; }
.gs-onb-step-d { color:var(--ink-2); font-size:13.5px; margin-top:3px; margin-bottom:14px; }
.gs-sportgrid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
@container gsapp (min-width:600px){ .gs-sportgrid { grid-template-columns:repeat(3,1fr); } }
.gs-sporttile { display:flex; align-items:center; gap:10px; padding:13px 13px; border-radius:14px; border:1.5px solid var(--line); background:var(--surface); cursor:pointer; transition:.12s; position:relative; }
.gs-sporttile:hover { border-color:var(--brand-border); }
.gs-sporttile.sel { border-color:var(--brand); background:var(--brand-tint); }
.gs-sporttile .e { font-size:22px; }
.gs-sporttile .n { font-weight:700; font-size:13.5px; line-height:1.1; }
.gs-sporttile .niche { font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--brand-text); }
.gs-sporttile .ck { margin-left:auto; width:20px;height:20px;border-radius:50%; border:1.5px solid var(--line-strong); display:grid;place-items:center; color:#fff; flex-shrink:0; }
.gs-sporttile.sel .ck { background:var(--brand); border-color:var(--brand); }
.gs-onb-lvl { display:flex; align-items:center; gap:12px; padding:12px 4px; border-bottom:1px solid var(--line-soft); }
.gs-onb-lvl:last-child { border-bottom:none; }
.gs-onb-lvl .e { font-size:22px; width:30px; text-align:center; }
.gs-onb-lvl .nm { font-weight:700; font-size:14px; flex:1; }

/* ============================================================
   COMPTE
   ============================================================ */
.gs-acct-card { display:flex; align-items:center; gap:14px; padding:16px 18px; }
.gs-acct-av { width:56px;height:56px;border-radius:16px; background:var(--brand); color:#fff; display:grid; place-items:center; font-family:'Bricolage Grotesque'; font-weight:800; font-size:24px; flex-shrink:0; }
.gs-timepick { display:flex; gap:7px; flex-wrap:wrap; margin-top:10px; }
.gs-timechip { font-family:'JetBrains Mono'; font-weight:700; font-size:13px; padding:8px 14px; border-radius:10px; border:1.5px solid var(--line); background:var(--surface); cursor:pointer; }
.gs-timechip.sel { border-color:var(--brand); background:var(--brand-tint); color:var(--brand-text); }

/* ============================================================
   RECHERCHE
   ============================================================ */
.gs-searchbar-lg { display:flex; align-items:center; gap:11px; background:var(--surface); border:1.5px solid var(--brand-border); border-radius:14px; padding:13px 16px; box-shadow:var(--shadow-sm); }
.gs-searchbar-lg input { border:none; background:none; outline:none; flex:1; font-family:inherit; font-size:16px; color:var(--ink); min-width:0; }
.gs-sgroup-lab { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-3); margin:20px 2px 8px; }
.gs-sresult { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:12px; cursor:pointer; border:1px solid transparent; }
.gs-sresult:hover { background:var(--inset); border-color:var(--line); }
.gs-sresult .e { width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center;font-size:17px;flex-shrink:0;border:1px solid var(--line-soft); }
.gs-sresult .nm { font-weight:700; font-size:14px; }
.gs-sresult .ty { font-size:11.5px; color:var(--ink-2); }
.gs-search-empty { text-align:center; padding:46px 24px; }
.gs-search-empty .em { font-size:46px; }
.gs-search-empty h3 { font-family:'Bricolage Grotesque'; font-weight:800; font-size:18px; margin:12px 0 0; }
.gs-search-empty p { color:var(--ink-2); font-size:14px; margin:8px auto 0; max-width:330px; line-height:1.45; }
.gs-chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; justify-content:center; }
.gs-chip-btn { font-size:13px; font-weight:600; padding:7px 13px; border-radius:999px; border:1px solid var(--line); background:var(--surface); cursor:pointer; }
.gs-chip-btn:hover { border-color:var(--brand-border); color:var(--brand-text); }

/* ============================================================
   ADMIN (rédaction — desktop)
   ============================================================ */
.gs-admin { display:block; }
@container gsapp (min-width:900px){
  .gs-admin { display:grid; grid-template-columns:288px 1fr; gap:26px; align-items:start; }
  .gs-admin-rail { position:sticky; top:0; }
}
.gs-admin-rail { margin-bottom:18px; }
.gs-adminbar { display:flex; align-items:center; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.gs-adminbar .tag { font-family:'JetBrains Mono'; font-size:10.5px; font-weight:700; color:var(--brand-text); background:var(--brand-tint); border:1px solid var(--brand-border); padding:3px 9px; border-radius:999px; }

.gs-field { margin-bottom:15px; }
.gs-label { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-2); margin-bottom:6px; display:block; }
.gs-input, .gs-textarea, .gs-select { width:100%; font-family:inherit; font-size:14.5px; color:var(--ink); background:var(--surface); border:1.5px solid var(--line); border-radius:11px; padding:11px 13px; outline:none; transition:.12s; }
.gs-input:focus, .gs-textarea:focus, .gs-select:focus { border-color:var(--brand); box-shadow:var(--glow); }
.gs-textarea { resize:vertical; min-height:150px; line-height:1.6; }
.gs-title-input { font-family:'Bricolage Grotesque'; font-weight:800; font-size:22px; letter-spacing:-0.01em; }
.gs-admin-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gs-draft-item { display:flex; align-items:flex-start; gap:10px; padding:11px 12px; border-radius:11px; border:1px solid var(--line); margin-bottom:8px; cursor:pointer; background:var(--surface); transition:.12s; }
.gs-draft-item:hover { border-color:var(--brand-border); }
.gs-draft-item.sel { border-color:var(--brand); background:var(--brand-tint); }
.gs-draft-item .dt { font-weight:700; font-size:13px; line-height:1.25; }
.gs-draft-item .dm { font-size:11px; color:var(--ink-2); margin-top:3px; }
.gs-diffedit { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid var(--line); border-radius:11px; margin-bottom:8px; background:var(--surface); }
.gs-diffedit .gs-input, .gs-diffedit .gs-select { padding:7px 9px; font-size:12.5px; border-radius:8px; }
.gs-diffedit .grab { color:var(--ink-3); cursor:grab; flex-shrink:0; }
.gs-diffedit .del { color:var(--down-text); cursor:pointer; background:none; border:none; flex-shrink:0; padding:4px; }
.gs-savebar { display:flex; gap:10px; align-items:center; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }

/* --- carte événement EN DIRECT : couleur "direct" (terracotta) + tag bien visible --- */
.gs-evt-live { position:relative; border:1.5px solid var(--down); background:linear-gradient(0deg, var(--down-tint), transparent 55%), var(--surface); box-shadow:0 0 0 4px var(--down-tint), 0 12px 30px -16px var(--down); }
.gs-evt-livetag { position:absolute; top:12px; right:12px; z-index:3; display:inline-flex; align-items:center; gap:6px; background:var(--down); color:#fff; font-family:'Bricolage Grotesque'; font-weight:800; font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; padding:5px 11px 5px 9px; border-radius:999px; box-shadow:0 4px 14px -3px var(--down); }
.gs-evt-livetag .d { width:7px; height:7px; border-radius:50%; background:#fff; animation:gsEvtLivePulse 1.6s ease-out infinite; }
@keyframes gsEvtLivePulse { 0%{ box-shadow:0 0 0 0 rgba(255,255,255,.75);} 70%{ box-shadow:0 0 0 6px rgba(255,255,255,0);} 100%{ box-shadow:0 0 0 0 rgba(255,255,255,0);} }
@media (prefers-reduced-motion: reduce){ .gs-evt-livetag .d { animation:none; } }
