/* ============================================================
   ICON BUTTON
   ------------------------------------------------------------
       <button class="ice-icon-btn" data-shape="circle" aria-label="Partager">
         <svg …>
       </button>

   Absorbs: share / print on article cards, the notification bell,
   the right-rail actions (dismiss, bookmark, archive), the FAB.
   ============================================================ */

.ice-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  inline-size: var(--_size);
  block-size:  var(--_size);
  border-radius: var(--radius-6);
  border: var(--border-w) solid var(--elev-primary-2-border);

  color: var(--fg-medium);
  cursor: pointer;
  position: relative;

  background-image: var(--elev-primary-2-image);
  box-shadow: var(--elev-primary-2-shadow);

  transition: color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);

  --_size: var(--height-s);
}

.ice-icon-btn > .ice-icon { inline-size: var(--icon-s); block-size: var(--icon-s); stroke-width: var(--lucide-stroke); }

/* Always alone, so always the 80 % of an icon-only glass button. */
.ice-icon-btn > .ice-icon { opacity: .8; }

/* Same hover as the glass buttons: elevation highlight, and the icon
   comes up to full strength in the link blue. Figma 76:11640. */
.ice-icon-btn:hover:not(:disabled) {
  color: var(--fg-link);
  border-color: var(--elev-highlight-border-lit) var(--elev-highlight-border-lit)
                var(--elev-highlight-border)     var(--elev-highlight-border);
  background-image: var(--elev-highlight-image);
  box-shadow: var(--elev-highlight-shadow);
  backdrop-filter: blur(var(--elev-highlight-blur));
  -webkit-backdrop-filter: blur(var(--elev-highlight-blur));
}
.ice-icon-btn:hover:not(:disabled) > .ice-icon { opacity: 1; }
.ice-icon-btn:active { transform: translateY(1px); }
/* Same disabled rule as .ice-btn — no hover, no pointer, no click. */
.ice-icon-btn:disabled {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.ice-icon-btn[data-shape="circle"] { border-radius: var(--radius-full); }

.ice-icon-btn[data-size="sm"] { --_size: var(--height-2xs); }
.ice-icon-btn[data-size="md"] { --_size: var(--height-s); }
.ice-icon-btn[data-size="lg"] { --_size: var(--height-m); }

/* Plain — no glass, for icons sitting directly on a bar. */
.ice-icon-btn[data-variant="plain"] {
  background-image: none;
  box-shadow: none;
  border-color: transparent;
}
.ice-icon-btn[data-variant="plain"]:hover { background-color: var(--hover-veil); }
