/* ═══════════════════════════════════════════════════════════════════════
 * OLYMPE — Bulle d'équipe + SOS (Echo, ATHENA)                  build R50
 * Jetons ATHENA (--t-*) si présents, sinon valeurs Océan par défaut.
 * ═══════════════════════════════════════════════════════════════════════ */
#eq-bulle, #eq-panneau, #eq-sos, #eq-alerte{
  --eq-pri:var(--t-pri,#2B5CC0); --eq-pri2:var(--t-pri2,#1A3E8E); --eq-acc:var(--t-acc,#C9952F); --eq-acc2:var(--t-acc2,#EBC879);
  --eq-ink:var(--t-ink,#13264D); --eq-ink2:var(--t-ink2,#4A5D82); --eq-ink3:var(--t-ink3,#8796B3);
  --eq-surf:var(--t-surf,#fff); --eq-surf2:var(--t-surf2,#F4F7FD); --eq-ligne:var(--t-ligne,rgba(43,92,192,.16));
  --eq-hero:var(--t-hero,linear-gradient(135deg,#2E63CC,#1A3E8E)); --eq-rouge:#D7192F;
  --eq-font:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  font-family:var(--eq-font); box-sizing:border-box;
}
#eq-bulle *, #eq-panneau *, #eq-sos *, #eq-alerte *{ box-sizing:border-box; }
#eq-panneau[hidden], #eq-sos[hidden], #eq-alerte[hidden], .eqs-etape1[hidden], .eqs-etape2[hidden]{ display:none !important; }

/* ── Bulle ─────────────────────────────────────────────────────────── */
#eq-bulle{ position:fixed; z-index:9000; right:18px; bottom:calc(var(--eq-bas,18px) + env(safe-area-inset-bottom)); width:58px; height:58px;
  border:0; padding:0; background:none; cursor:pointer; color:var(--eq-pri2); animation:eqbIn .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes eqbIn{ from{ transform:scale(0) rotate(-30deg); opacity:0; } }
.eqb-coeur{ position:absolute; inset:0; border-radius:50%; display:grid; place-items:center; background:var(--eq-hero);
  box-shadow:0 10px 26px rgba(26,62,142,.38), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -6px 12px rgba(0,0,0,.15);
  transition:transform .3s cubic-bezier(.34,1.56,.64,1); }
.eqb-coeur svg{ width:30px; height:30px; color:var(--eq-pri2); }
#eq-bulle:hover .eqb-coeur{ transform:translateY(-2px) scale(1.05); }
#eq-bulle:active .eqb-coeur{ transform:scale(.92); }
#eq-bulle:focus-visible{ outline:none; } #eq-bulle:focus-visible .eqb-coeur{ box-shadow:0 0 0 3px #fff, 0 0 0 6px var(--eq-pri); }
#eq-bulle.eqb-ouvert .eqb-coeur{ box-shadow:0 0 0 3px var(--eq-acc2), 0 10px 26px rgba(26,62,142,.38); }
.eqb-n{ position:absolute; top:-4px; right:-4px; min-width:22px; height:22px; padding:0 6px; border-radius:11px; background:var(--eq-acc); color:#fff;
  font:800 12px/22px var(--eq-font); text-align:center; box-shadow:0 0 0 2.5px #fff; transform:scale(0); transition:transform .3s cubic-bezier(.34,1.56,.64,1); }
#eq-bulle.eqb-nonlu .eqb-n{ transform:scale(1); }
#eq-bulle.eqb-nonlu .eqb-coeur::after{ content:""; position:absolute; inset:0; border-radius:50%; border:3px solid var(--eq-acc2); animation:eqbOnde 2.2s ease-out infinite; }
@keyframes eqbOnde{ from{ transform:scale(.9); opacity:.9; } to{ transform:scale(1.5); opacity:0; } }
.eqb-apercu{ position:absolute; right:68px; bottom:4px; width:max-content; max-width:min(260px,64vw); padding:9px 13px; border-radius:16px 16px 4px 16px;
  background:var(--eq-surf); color:var(--eq-ink); box-shadow:0 10px 26px rgba(0,0,0,.16); font-size:13px; line-height:1.35; text-align:left;
  opacity:0; transform:translateX(10px) scale(.95); pointer-events:none; transition:opacity .25s, transform .3s; }
.eqb-apercu b{ display:block; font-size:12px; color:var(--eq-pri2); }
#eq-bulle.eqb-apercu-on .eqb-apercu{ opacity:1; transform:none; }

/* ── Panneau ───────────────────────────────────────────────────────── */
#eq-panneau{ position:fixed; z-index:9001; right:18px; bottom:calc(var(--eq-bas,18px) + 70px + env(safe-area-inset-bottom)); width:min(390px,calc(100vw - 24px));
  height:min(560px,calc(100vh - 140px)); height:min(560px,calc(100dvh - 140px)); display:flex; flex-direction:column; overflow:hidden;
  background:var(--eq-surf); color:var(--eq-ink); border:1px solid var(--eq-ligne); border-radius:22px; box-shadow:0 24px 60px rgba(19,38,77,.28);
  animation:eqpIn .4s cubic-bezier(.22,1,.36,1); }
@keyframes eqpIn{ from{ opacity:0; transform:translateY(14px) scale(.97); } }
.eq-tete{ display:flex; align-items:center; gap:10px; padding:12px 12px 12px 14px; background:var(--eq-hero); color:#fff; }
.eq-av{ width:38px; height:38px; border-radius:50%; display:grid; place-items:center; font-size:19px; background:rgba(255,255,255,.18); flex:none; }
.eq-tt{ flex:1; min-width:0; line-height:1.2; }
.eq-tt b{ display:block; font-size:15px; letter-spacing:.02em; }
.eq-tt small{ display:flex; align-items:center; gap:6px; font-size:12px; opacity:.88; }
.eq-pt{ width:8px; height:8px; border-radius:50%; background:#F6C344; }
.eq-pt.ok{ background:#4ADE80; box-shadow:0 0 0 3px rgba(74,222,128,.25); } .eq-pt.ko{ background:#FF6B6B; }
.eq-sos-btn, .eq-x{ flex:none; height:36px; border-radius:12px; border:0; cursor:pointer; font-size:16px; }
.eq-sos-btn{ padding:0 10px; background:#fff; box-shadow:0 0 0 2px rgba(215,25,47,.6); }
.eq-x{ width:36px; background:rgba(255,255,255,.18); color:#fff; }
.eq-prive{ font-size:11.5px; color:var(--eq-ink3); text-align:center; padding:6px 10px; background:var(--eq-surf2); border-bottom:1px solid var(--eq-ligne); }
.eq-fil{ flex:1; overflow:auto; padding:10px 12px 14px; background:var(--eq-surf2); overscroll-behavior:contain; }
.eq-vide{ text-align:center; color:var(--eq-ink2); padding:40px 16px; }
.eq-vide div{ font-size:34px; } .eq-vide p{ font-size:13.5px; }
.eq-jour{ text-align:center; margin:12px 0 8px; } .eq-jour span{ font-size:11.5px; font-weight:700; color:var(--eq-ink3); background:var(--eq-surf); padding:3px 10px; border-radius:999px; text-transform:capitalize; }
.eq-m{ display:flex; flex-direction:column; align-items:flex-start; margin-top:8px; animation:eqmIn .35s cubic-bezier(.34,1.56,.64,1) both; }
.eq-m.suite{ margin-top:3px; }
.eq-m.moi{ align-items:flex-end; }
@keyframes eqmIn{ from{ opacity:0; transform:translateY(6px) scale(.97); } }
.eq-nom{ font-size:11.5px; font-weight:700; color:var(--eq-pri2); margin:0 0 2px 10px; }
.eq-b{ max-width:82%; padding:8px 12px 6px; border-radius:16px 16px 16px 5px; background:var(--eq-surf); box-shadow:0 1px 2px rgba(0,0,0,.06); font-size:14.5px; line-height:1.4; overflow-wrap:anywhere; }
.eq-m.moi .eq-b{ border-radius:16px 16px 5px 16px; background:var(--eq-pri); color:#fff; }
.eq-m.moi .eq-b a{ color:#fff; }
.eq-m.envoi .eq-b{ opacity:.7; }
.eq-b time{ display:block; text-align:right; font-size:10.5px; opacity:.65; margin-top:2px; }
.eq-sos-carte{ margin:10px 0; padding:10px 12px; border-radius:14px; background:#FFF0F1; border:1px solid rgba(215,25,47,.35); color:#7A0E19; display:flex; flex-direction:column; gap:3px; font-size:13.5px; }
.eq-sos-carte b{ color:var(--eq-rouge); letter-spacing:.06em; } .eq-sos-carte small{ opacity:.8; } .eq-sos-carte a{ color:var(--eq-rouge); font-weight:700; }
.eq-saisie{ padding:8px 10px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--eq-ligne); background:var(--eq-surf); }
.eq-qui{ font-size:11.5px; color:var(--eq-ink3); margin:0 4px 6px; }
.eq-qui button{ border:0; background:none; color:var(--eq-pri); font:inherit; font-weight:700; cursor:pointer; padding:0; text-decoration:underline; }
.eq-ligne{ display:flex; gap:8px; align-items:flex-end; }
.eq-ligne textarea{ flex:1; resize:none; border:1px solid var(--eq-ligne); border-radius:18px; padding:9px 14px; font:15px/1.35 var(--eq-font); color:var(--eq-ink); background:var(--eq-surf2); max-height:120px; }
.eq-ligne textarea:focus{ outline:none; border-color:var(--eq-pri); background:var(--eq-surf); }
.eq-envoi{ flex:none; width:42px; height:42px; border-radius:50%; border:0; background:var(--eq-hero); color:#fff; font-size:17px; cursor:pointer; }
.eq-envoi:active{ transform:scale(.92); }

/* ── Fenêtre SOS ───────────────────────────────────────────────────── */
#eq-sos{ position:fixed; inset:0; z-index:9500; display:grid; place-items:center; padding:16px; background:rgba(60,6,12,.55); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.eqs-carte{ position:relative; width:min(420px,100%); max-height:100%; overflow:auto; background:var(--eq-surf); color:var(--eq-ink); border-radius:24px; padding:22px 20px 20px; text-align:center;
  box-shadow:0 30px 70px rgba(0,0,0,.35); border-top:6px solid var(--eq-rouge); animation:eqpIn .35s cubic-bezier(.22,1,.36,1); }
.eqs-x{ position:absolute; top:10px; right:10px; width:34px; height:34px; border-radius:50%; border:0; background:var(--eq-surf2); cursor:pointer; }
.eqs-ic{ font-size:40px; } .eqs-ic.ok{ filter:none; } .eqs-ic.ko{ filter:grayscale(1); }
.eqs-carte h2{ margin:4px 0 6px; font-size:22px; color:var(--eq-rouge); letter-spacing:.04em; }
.eqs-carte p{ margin:0 0 12px; font-size:14px; line-height:1.45; color:var(--eq-ink2); }
.eqs-carte p .ko{ color:var(--eq-rouge); }
.eqs-motifs{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:10px; }
.eqs-motifs button{ border:1px solid var(--eq-ligne); background:var(--eq-surf2); color:var(--eq-ink); border-radius:999px; padding:7px 12px; font:600 13px var(--eq-font); cursor:pointer; }
.eqs-motifs button.on{ background:var(--eq-rouge); border-color:var(--eq-rouge); color:#fff; }
#eqs-precision{ width:100%; border:1px solid var(--eq-ligne); border-radius:12px; padding:10px 12px; font:14px var(--eq-font); color:var(--eq-ink); background:var(--eq-surf2); margin-bottom:14px; }
.eqs-tenir{ position:relative; width:150px; height:150px; border-radius:50%; border:0; cursor:pointer; background:radial-gradient(circle at 35% 30%,#FF6B7A,#D7192F 60%,#8E0A1A);
  color:#fff; font:600 14px/1.25 var(--eq-font); box-shadow:0 14px 34px rgba(215,25,47,.45), inset 0 2px 0 rgba(255,255,255,.35); touch-action:none; user-select:none; -webkit-user-select:none;
  transition:transform .2s; }
.eqs-tenir b{ font-size:17px; }
.eqs-tenir.appui{ transform:scale(.95); }
.eqs-tenir svg{ position:absolute; inset:-8px; width:calc(100% + 16px); height:calc(100% + 16px); transform:rotate(-90deg); }
.eqs-tenir circle{ fill:none; stroke-width:6; } .eqs-tenir .f{ stroke:rgba(215,25,47,.15); } .eqs-tenir .p{ stroke:#FFB703; stroke-linecap:round; }
.eqs-tenir span{ position:relative; }
#eqs-aide{ display:block; margin-top:12px; font-size:11.5px; color:var(--eq-ink3); }
.eqs-appels{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:6px 0 14px; }
.eqs-appels a{ padding:10px 14px; border-radius:12px; background:var(--eq-surf2); border:1px solid var(--eq-ligne); color:var(--eq-ink); text-decoration:none; font-weight:700; font-size:14px; }
.eqs-ok{ border:0; border-radius:12px; padding:11px 22px; background:var(--eq-hero); color:#fff; font:700 14px var(--eq-font); cursor:pointer; }

/* ── Écran d'alerte reçue ──────────────────────────────────────────── */
#eq-alerte{ position:fixed; inset:0; z-index:9800; display:grid; place-items:center; padding:20px; color:#fff; text-align:center;
  background:radial-gradient(circle at 50% 35%,#E4002B,#9E0020 70%,#5A0012); animation:eqaFond 1s ease-in-out infinite alternate; }
@keyframes eqaFond{ to{ background-position:0 10px; filter:brightness(1.12); } }
.eqa-in{ max-width:440px; }
.eqa-ic{ font-size:64px; animation:eqaIc .6s ease-in-out infinite alternate; }
@keyframes eqaIc{ to{ transform:scale(1.12) rotate(6deg); } }
#eq-alerte h2{ margin:6px 0; font-size:30px; letter-spacing:.12em; }
#eq-alerte p{ font-size:19px; margin:6px 0 10px; } #eq-alerte small{ display:block; opacity:.85; margin-bottom:12px; }
.eqa-l{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-bottom:16px; }
.eqa-l a{ color:#fff; font-weight:800; padding:10px 14px; border-radius:12px; background:rgba(255,255,255,.18); text-decoration:none; }
.eqa-acts{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.eqa-acts button{ border:0; border-radius:16px; min-height:52px; padding:12px 18px; font:800 15px var(--eq-font); cursor:pointer; background:rgba(255,255,255,.2); color:#fff; }
.eqa-acts button.ok{ background:#fff; color:#C8102E; min-width:190px; }

/* ── Téléphone : panneau plein écran qui monte du bas ──────────────── */
@media (max-width:600px){
  #eq-panneau{ inset:auto 0 0 0; width:100%; height:92vh; height:92dvh; border-radius:22px 22px 0 0; border:0; animation:eqpMonte .4s cubic-bezier(.22,1,.36,1); }
  @keyframes eqpMonte{ from{ transform:translateY(40px); opacity:0; } }
  #eq-bulle{ right:14px; }
  #eq-bulle.eqb-ouvert{ display:none; }
}
@media print{ #eq-bulle, #eq-panneau, #eq-sos, #eq-alerte{ display:none !important; } }
@media (prefers-reduced-motion:reduce){
  #eq-bulle, #eq-bulle *, #eq-panneau, #eq-panneau *, #eq-alerte, #eq-alerte *{ animation:none !important; transition:none !important; }
}
