/**
 * Ormind icon set — feuille de base.
 *
 * Compagnon de `icons.js` : ce que le JS ne peut pas dessiner (un
 * pseudo-élément ::before n'accueille pas de balise) est ici, sous forme de
 * masques. Même grammaire des deux côtés — tracé Lucide, 24×24, `currentColor`.
 *
 * À lier AVANT la feuille propre à la page, pour que celle-ci puisse redéfinir
 * la taille d'une icône dans son contexte.
 */

:root {
    --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    --icon-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
    --icon-file-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
    --icon-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
    --icon-triangle-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
    --icon-circle-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
}

svg.icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.15em;      /* assise sur la ligne de texte */
    /* Un clic sur l'icône est un clic sur le bouton qui la porte : sans ça,
       `event.target` est le <svg> et les tests d'appartenance ratent. */
    pointer-events: none;
}

/* Le seul mouvement toléré : le témoin d'attente. */
@keyframes icon-spin { to { transform: rotate(360deg); } }
svg.icon-spin { animation: icon-spin 1.1s linear infinite; }

/* Sur les pages de contenu (guide, CGU, signets, revue…), une icône remplace
   une glyphe de police : elle doit donc SUIVRE la taille du texte qui
   l'accompagne, comme le faisait la glyphe. Les surfaces applicatives
   (chat.html) fixent au contraire des tailles explicites, et redéclarent
   width/height là où c'est voulu. */
.icons-scale-with-text svg.icon {
    width: 1em;
    height: 1em;
}
