/* =========================================================
   PLCC — Barre d'application : retour, version, mise à jour
   ---------------------------------------------------------
   Pensée pour le pouce : la flèche à gauche, les outils à
   droite, tous deux en bas, hors de portée du contenu.
   ========================================================= */

/* ---------- flèche de retour ---------- */
.pl-retour{
  position:fixed; z-index:9400;
  left:max(12px, env(safe-area-inset-left));
  bottom:calc(14px + env(safe-area-inset-bottom));
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.6rem .95rem .6rem .75rem;
  background:#0B1B33; color:#F3F6FA;
  border:1px solid rgba(243,246,250,.16); border-radius:100px;
  cursor:pointer; box-shadow:0 6px 20px rgba(3,10,22,.34);
  font-family:"IBM Plex Mono","Barlow Condensed",system-ui,sans-serif;
  font-size:.78rem; letter-spacing:.05em; text-transform:uppercase;
  -webkit-tap-highlight-color:transparent;
}
.pl-retour:hover{ background:#14294a; }
.pl-retour:active{ transform:scale(.96); }
.pl-retour:focus-visible{ outline:2px solid #E8871E; outline-offset:2px; }
.pl-retour svg{
  width:18px; height:18px; fill:none; stroke:currentColor;
  stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round;
}

/* ---------- outils : version, mise à jour, installation ---------- */
.pl-outils{
  position:fixed; z-index:9400;
  right:max(12px, env(safe-area-inset-right));
  bottom:calc(14px + env(safe-area-inset-bottom));
}
.pl-outils__ouvrir{
  width:44px; height:44px; border-radius:50%; cursor:pointer;
  background:#0B1B33; color:#F3F6FA;
  border:1px solid rgba(243,246,250,.16);
  box-shadow:0 6px 20px rgba(3,10,22,.34);
  display:flex; align-items:center; justify-content:center;
  -webkit-tap-highlight-color:transparent;
}
.pl-outils__ouvrir:hover{ background:#14294a; }
.pl-outils__ouvrir:focus-visible{ outline:2px solid #E8871E; outline-offset:2px; }
.pl-outils__ouvrir svg{
  width:21px; height:21px; fill:none; stroke:currentColor;
  stroke-width:1.9; stroke-linecap:round;
}

.pl-outils__boite{
  position:absolute; right:0; bottom:54px;
  width:min(290px, calc(100vw - 26px));
  background:#0B1B33; color:#F3F6FA;
  border:1px solid rgba(232,135,30,.34); border-radius:12px;
  padding:1rem; box-shadow:0 16px 44px rgba(3,10,22,.5);
  font-family:"IBM Plex Sans",system-ui,sans-serif;
}
.pl-outils__boite[hidden]{ display:none; }

.pl-outils__titre{
  margin:0 0 .5rem; font-family:"Barlow Condensed",sans-serif;
  font-size:1.02rem; font-weight:600; letter-spacing:.02em;
}
.pl-outils__version{
  margin:0 0 .55rem; font-size:.82rem; color:rgba(243,246,250,.72);
  font-family:"IBM Plex Mono",monospace;
}
.pl-outils__version strong{ color:#F6D68C; }
.pl-outils__etat{
  margin:0 0 .6rem; font-size:.79rem; line-height:1.5;
  color:#F6D68C; min-height:1.1em;
}
.pl-outils__aide{
  margin:.7rem 0 0; font-size:.74rem; line-height:1.55;
  color:rgba(243,246,250,.6);
}

.pl-btn{
  display:block; width:100%; margin-bottom:.45rem;
  padding:.6rem .8rem; border-radius:8px; cursor:pointer;
  font-family:"IBM Plex Mono",monospace; font-size:.78rem;
  letter-spacing:.03em; border:1px solid transparent;
}
.pl-btn--maj{ background:#E8871E; color:#0B1B33; font-weight:600; }
.pl-btn--maj:hover{ background:#F09A3C; }
.pl-btn--maj[disabled]{ opacity:.6; cursor:default; }
.pl-btn--install{
  background:transparent; color:rgba(243,246,250,.85);
  border-color:rgba(243,246,250,.3);
}
.pl-btn--install:hover{ border-color:rgba(243,246,250,.6); color:#fff; }
.pl-btn--install[hidden]{ display:none; }
.pl-btn:focus-visible{ outline:2px solid #F6D68C; outline-offset:2px; }

/* ---------- ne pas masquer le bandeau de mise à jour ---------- */
.maj-bandeau{ bottom:70px; }

/* ---------- très petits écrans : la flèche se réduit ---------- */
@media (max-width:360px){
  .pl-retour span{ display:none; }
  .pl-retour{ padding:.6rem .7rem; }
}

/* ---------- impression : rien de tout cela ---------- */
@media print{
  .pl-retour, .pl-outils{ display:none !important; }
}

@media (prefers-reduced-motion:reduce){
  .pl-retour:active{ transform:none; }
}
