/* Recap · index · bouton de recherche flottant (bulle « Chercher » + loupe qui fouille, en bas à gauche) */
  /* ---------- search FAB : bottom-left « Bulle » (speech bubble with a small tail) — the magnifier searches in a small circle, the caret blinks. Colours come from the theme tokens (accent colour + light / dark). ---------- */
  #subjects, #profile { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .sfab { --sf-c: var(--accent); --sf-sh: color-mix(in srgb, var(--sf-c) 60%, #000);
    position: fixed; left: 12px; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 21; display: block; text-decoration: none;
    filter: drop-shadow(3px 4px 0 var(--sf-sh)); transition: transform .15s ease;   /* the hard shadow follows the bubble AND its tail */
    -webkit-tap-highlight-color: transparent; animation: sf-in .45s cubic-bezier(.3, 1.5, .5, 1) .05s backwards; }
  body:not(.go) .sfab { opacity: 0; pointer-events: none; animation: none; }
  @keyframes sf-in { from { opacity: 0; translate: 0 26px; scale: .6; } }
  .sfab .sf-pill { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 6px; box-sizing: border-box; white-space: nowrap;
    position: relative; color: var(--on); background: var(--sf-c); border-radius: 22px;
    font: 400 18px/1 "Patrick Hand", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  .sfab .sf-pill::after { content: ""; position: absolute; left: 18px; bottom: -9px; width: 18px; height: 10px; background: var(--sf-c); clip-path: polygon(0 0, 100% 0, 0 100%); }
  /* fenêtre ronde creusée dans la carte : la loupe (même jeu que la barre du haut) y cherche doucement, sans jamais en sortir */
  .sfab .sf-chip { display: block; position: relative; flex: none; width: 44px; height: 44px; margin-inline-start: -2px; border-radius: 50%; overflow: hidden; isolation: isolate;
    background: radial-gradient(circle at 36% 28%, color-mix(in srgb, var(--sf-c) 62%, #000) 0%, color-mix(in srgb, var(--sf-c) 74%, #000) 55%, color-mix(in srgb, var(--sf-c) 66%, #000) 100%);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .42), inset 0 -1px 2px rgba(255, 255, 255, .22), inset 0 0 0 1.5px color-mix(in srgb, var(--sf-c) 55%, #000), 0 1px 0 rgba(255, 255, 255, .28); }
  .sfab .sf-chip::before { content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
    background: url(../../img/ic/search-l.webp) center / contain no-repeat; filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, .4));
    animation: sf-look 7s ease-in-out .8s infinite; will-change: translate, rotate; }
  .sfab .sf-chip::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;   /* reflet de verre très léger */
    background: radial-gradient(ellipse 70% 45% at 38% 18%, rgba(255, 255, 255, .26), transparent 70%); }
  .sfab .sf-chip svg { display: none; }
  @keyframes sf-look {   /* balayage lent : la loupe passe d'un coin à l'autre de la fenêtre en s'inclinant un peu, comme si elle inspectait */
    0%, 100% { translate: -3px -2px; rotate: -6deg; scale: 1; }
    18% { translate: 3px -3px; rotate: 5deg; scale: 1.04; }
    38% { translate: 4px 2px; rotate: 9deg; scale: 1; }
    58% { translate: -1px 4px; rotate: -2deg; scale: 1.05; }
    80% { translate: -4px 1px; rotate: -9deg; scale: 1; }
  }
  :root[data-theme="dark"] .sfab .sf-chip::before { background-image: url(../../img/ic/search-d.webp); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sfab .sf-chip::before { background-image: url(../../img/ic/search-d.webp); } }
  .sfab .sf-scan { transform-box: view-box; transform-origin: 20px 20px; animation: sf-scan 3.2s linear infinite; }
  .sfab .sf-lens { stroke: var(--sf-c); fill: none; stroke-width: 3.2; stroke-linecap: round; }
  .sfab .sf-hd { stroke-width: 4; }
  .sfab .sf-glint { stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; }
  .sfab .sf-cur { display: block; flex: none; width: 2px; height: 20px; margin-left: -6px; background: var(--on); animation: sf-blink 1s steps(1) infinite; }
  @keyframes sf-scan { 0% { transform: rotate(0) translate(3px, 0) rotate(0); } 100% { transform: rotate(360deg) translate(3px, 0) rotate(-360deg); } }
  @keyframes sf-blink { 50% { opacity: 0; } }
  .sfab:active { transform: translate(2px, 3px); }
  .sfab:active .sf-chip::before { animation-duration: 2.2s; }
  .sfab:focus-visible .sf-pill { outline: 3px solid var(--gold); outline-offset: 3px; }
  @media (prefers-reduced-motion: reduce) { .sfab, .sfab .sf-scan, .sfab .sf-cur, .sfab .sf-chip, .sfab .sf-chip::before { animation: none !important; } }
