<!doctype html>
<html lang="fr">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/icons/icon.svg?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="16x16" href="/icons/icon-16x16.png?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="32x32" href="/icons/icon-32x32.png?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="48x48" href="/icons/icon-48x48.png?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="96x96" href="/icons/icon-96x96.png?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="192x192" href="/icons/icon-192x192.png?v=1.0.5" />
    <link rel="icon" type="image/png" sizes="512x512" href="/icons/icon-512x512.png?v=1.0.5" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    
    <!-- PWA Meta Tags -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="apple-mobile-web-app-title" content="OneHote">
    <meta name="theme-color" content="#1a1a1a">
    
    <!-- Touch Icons -->
    <link rel="apple-touch-icon" sizes="180x180" href="/icons/icon-180x180.png?v=1.0.5">
    <link rel="apple-touch-icon" sizes="192x192" href="/icons/icon-192x192.png?v=1.0.5">
    <link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512x512.png?v=1.0.5">
    <link rel="manifest" href="/manifest.json?v=1.0.5">
    
    <title>OneHote pro</title>
    
    <!-- Script d'initialisation du thème (évite le flash) -->
    <script>
      (function() {
        try {
          // Récupérer le thème sauvegardé
          const savedTheme = localStorage.getItem('theme') || 'auto';
          let shouldBeDark = false;
          
          if (savedTheme === 'dark') {
            shouldBeDark = true;
          } else if (savedTheme === 'light') {
            shouldBeDark = false;
          } else {
            // Mode 'auto' : détecter le système
            shouldBeDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
          }
          
          // Appliquer immédiatement la classe dark si nécessaire
          if (shouldBeDark) {
            document.documentElement.classList.add('dark');
          }
        } catch (e) {
          console.warn('Erreur initialisation thème:', e);
        }
      })();
    </script>
    <script type="module" crossorigin src="/assets/index.D8WcjoBV.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index.DIb-Q8ng.css">
  </head>
  <body>
    <div id="root"></div>
    <!-- Portal racine pour les modals/popups/toasts - toujours au-dessus -->
    <div id="modal-root"></div>
  </body>
</html>
