/* 
 * Fix spécifique pour Font Awesome sur Firefox
 * Contournement pour les polices rejetées par le sanitizer
 */

/* Import externe pour contourner le sanitizer Firefox */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Polices de fallback locales si nécessaire */
@font-face {
  font-family: "FA-Solid-Fallback";
  src: url("./fonts/fa-solid-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FA-Brands-Fallback";
  src: url("./fonts/fa-brands-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fallback amélioré pour Firefox */
.fas, .fa-solid {
  font-family: "Font Awesome 6 Free", "FA-Solid-Fallback", "Font Awesome 5 Free", "Apple Color Emoji", "Segoe UI Emoji", Arial, sans-serif;
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.fab, .fa-brands {
  font-family: "Font Awesome 6 Brands", "FA-Brands-Fallback", "Font Awesome 5 Brands", "Apple Color Emoji", "Segoe UI Emoji", Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Amélioration de la compatibilité cross-browser */
.fa, .fas, .fab, .far, .fal, .fad, .fat, .fass {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Fix spécifique Firefox avec détection du navigateur */
@-moz-document url-prefix() {
  /* Forcer le chargement via CDN pour Firefox */
  .fa, .fas, .fab, .far, .fal, .fad, .fat, .fass {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Apple Color Emoji", "Segoe UI Emoji", Arial, sans-serif;
  }
  
  /* Fallback Unicode si les polices échouent complètement */
  .fa-download::before { content: "⬇️"; }
  .fa-shield-alt::before { content: "🛡️"; }
  .fa-user-shield::before { content: "👤"; }
  .fa-windows::before { content: "🪟"; }
  .fa-apple::before { content: "🍎"; }
  .fa-linux::before { content: "🐧"; }
  .fa-android::before { content: "🤖"; }
  .fa-clock::before { content: "🕐"; }
  .fa-check::before { content: "✅"; }
  .fa-times::before { content: "❌"; }
  .fa-external-link-alt::before { content: "🔗"; }
  .fa-heart::before { content: "❤️"; }
}

/* Alternative: utiliser des symboles système */
@supports (-moz-appearance: none) and (not (font-family: "Font Awesome 6 Free")) {
  .fa::before, .fas::before, .fab::before {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  }
}
