    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body { 
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
      color: #333;
    }
    
    .container {
      max-width: 420px;
      margin: 0 auto;
      background: #fff;
      border-radius: 20px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.1);
      overflow: hidden;
      position: relative;
    }
    
    .header {
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      color: white;
      padding: 20px 20px 15px;
      text-align: center;
      position: relative;
    }
    
    .settings-btn {
      position: absolute;
      top: 15px;
      left: 15px;
      background: rgba(255, 255, 255, 0.2);
      border: none;
      border-radius: 50%;
      width: 35px;  /* bouton plus large */
      height: 35px;  /* bouton plus haut */
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px; /* roue crantée plus grande */
      color: white;
      transition: all 0.3s ease;
    }
    
    .settings-btn:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: rotate(90deg);
    }
    
    .settings-panel {
      position: fixed;
      top: 0;
      left: -300px;
      width: 300px;
      height: 100vh;
      background: white;
      box-shadow: 2px 0 15px rgba(0,0,0,0.2);
      z-index: 1000;
      transition: left 0.3s ease;
      padding: 20px;
      overflow-y: auto;
    }
    
    .settings-panel.open {
      left: 0;
    }
    
    .settings-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0,0,0,0.5);
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .settings-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    
    .settings-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 25px;
      padding-bottom: 15px;
      border-bottom: 2px solid #f0f0f0;
    }
    
    .settings-title {
      font-size: 20px;
      font-weight: 700;
      color: #333;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .close-settings {
      background: #ff6b6b;
      border: none;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      cursor: pointer;
      color: white;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .setting-group {
      margin-bottom: 25px;
    }
    
    .setting-label {
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      display: block;
      font-size: 14px;
    }
    
    .color-options {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    
    .color-option {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 3px solid transparent;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }
    
    .color-option.selected {
      border-color: #333;
      transform: scale(1.1);
    }
    
    .color-option.grey {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .color-option.blue {
      background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    }
    
    .color-option.yellow {
      background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
    }

    .color-option.white {
      background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    }

    .color-option.black {
      background: linear-gradient(135deg, #010101 0%, #000000 100%);
    }

    
    .text-input {
      width: 100%;
      padding: 12px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 14px;
      transition: border-color 0.2s ease;
    }
    
    .text-input:focus {
      outline: none;
      border-color: #667eea;
    }
    
    .save-btn {
      background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
      color: white;
      border: none;
      padding: 12px 20px;
      border-radius: 25px;
      cursor: pointer;
      font-weight: 600;
      width: 100%;
      margin-top: 10px;
      transition: all 0.3s ease;
    }
    
    .save-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    }
    
    .header h1 {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 4px;
      letter-spacing: -0.5px;
    }
    
    .header .subtitle {
      font-size: 20px; /* Taille du titre */
      opacity: 0.9;
      font-weight: 400;
    }
    
    .content {
      padding: 20px 20px;
    }
    
    .camera-section {
      text-align: center;
      margin-bottom: 30px;
    }
    
    video {
      width: 100%;
      max-width: 300px;
      height: 200px;
      background: #000;
      border-radius: 15px;
      margin: 15px 0;
      object-fit: cover;
    }
    
    .btn {
  	padding: 8px 16px; /* Réduit le padding (au lieu de 12px 24px) */
  	margin: 4px; /* Réduit la marge (au lieu de 8px) */
  	border: none;
  	border-radius: 20px; /* Réduit légèrement le rayon pour un look proportionnel */
  	cursor: pointer;
  	font-size: 12px; /* Réduit la taille de la police (au lieu de 14px) */
  	font-weight: 600;
  	transition: all 0.3s ease;
  	display: inline-flex;
  	align-items: center;
  	gap: 6px; /* Réduit l'espacement entre icône et texte (au lieu de 8px) */
  	text-decoration: none;
  	min-width: 100px; /* Réduit la largeur minimale (au lieu de 120px) */
  	justify-content: center;
    }
    
    .btn-primary {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    
    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
    
    .btn-success {
      background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    }
    
    .btn-danger {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    
    .btn-info {
      background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(55, 66, 250, 0.4);
    }
    
    .btn-warning {
      background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
    }
    
    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none !important;
    }
    
    .stats-container {
      display: flex;
      justify-content: space-around;
      margin: 25px 0;
      gap: 15px;
    }
    
    .stat-circle {
      text-align: center;
      flex: 1;
    }
    
    .circle {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 8px;
      position: relative;
      background: #f8f9fa;
      border: 3px solid #e9ecef;
    }
    
    .circle.unique {
      border-color: #667eea;
      color: #667eea;
    }
    
    .circle.duplicate {
      border-color: #ffa726;
      color: #ffa726;
    }
    
    .circle.total {
      border-color: #00d2ff;
      color: #00d2ff;
      background: linear-gradient(135deg, rgba(0, 210, 255, 0.1) 0%, rgba(75, 195, 255, 0.1) 100%);
    }
    
    .circle-number {
      font-size: 24px;
      font-weight: 700;
      line-height: 1;
    }
    
    .circle-label {
      font-size: 12px;
      color: #666;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .status {
      background: #f8f9fa;
      padding: 8px 10px; /* moins haut et moins large */
      border-radius: 10px; /* coins un peu plus petits */
      text-align: center;
      margin: 10px 0; /* réduit l’espace au-dessus et en-dessous */
      font-weight: 500;
      font-size: 14px;     /* taille du texte */
      border-left: 3px solid #667eea; /* épaisseur de ligne */
    }
    
    .file-selector {
      background: #f8f9fa;
      padding: 15px;
      border-radius: 12px;
      margin-bottom: 15px;
      text-align: center;
    }
    
    .file-info {
      margin-top: 10px;
      font-size: 13px;
      color: #666;
      background: #e8f5e8;
      padding: 8px 12px;
      border-radius: 8px;
      display: inline-block;
    }
    
    .data-section {
      background: #f8f9fa;
      border-radius: 15px;
      padding: 20px;
      margin-top: 20px;
    }
    
    .section-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 15px;
      color: #333;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .data-list {
      max-height: 250px;
      overflow-y: auto;
      margin-top: 15px;
    }
    
    .scanned-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 15px;
      background: white;
      border-radius: 10px;
      margin-bottom: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      font-size: 13px;
      word-break: break-word;
    }
    
    .scanned-item .content {
      flex: 1;
      margin-right: 10px;
    }
    
    .scanned-item .timestamp {
      color: #666;
      font-size: 11px;
      margin-top: 2px;
    }
    
    .delete-btn {
      background: #ff6b6b;
      color: white;
      border: none;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      transition: all 0.2s ease;
    }
    
    .delete-btn:hover {
      background: #ee5a24;
      transform: scale(1.1);
    }
    
    .visitor-count {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 15px;
      border-radius: 12px;
      text-align: center;
      font-weight: 600;
      margin-top: 20px;
      font-size: 16px;
    }
    
    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      margin: 20px 0;
    }
    
    .camera-controls {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-bottom: 15px;
    }
    
    /* Flash visuel */
    .flash {
      position: fixed;
      inset: 0;
      background: rgba(0, 255, 0, 0.25);
      pointer-events: none;
      z-index: 9999;
      animation: flashAnim 180ms ease-out;
    }
    
    @keyframes flashAnim {
      from { opacity: 1 }
      to { opacity: 0 }
    }

    /* Effet V de validation */
    .success-checkmark {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 10000;
      pointer-events: none;
      opacity: 0;
      animation: checkmarkAppear 2s ease-in-out;
    }

    .checkmark-circle {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: linear-gradient(135deg, #00d084 0%, #00b894 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 32px rgba(0, 208, 132, 0.4);
      border: 4px solid rgba(255, 255, 255, 0.2);
    }

    .checkmark-stem {
      width: 4px;
      height: 30px;
      background: white;
      border-radius: 2px;
      position: absolute;
      transform: rotate(45deg);
      transform-origin: bottom;
    }

    .checkmark-kick {
      width: 4px;
      height: 16px;
      background: white;
      border-radius: 2px;
      position: absolute;
      transform: rotate(-45deg);
      transform-origin: bottom;
      margin-left: -12px;
      margin-top: 8px;
    }

    @keyframes checkmarkAppear {
      0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.3);
      }
      15% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.1);
      }
      25% { 
        transform: translate(-50%, -50%) scale(1);
      }
      85% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
      }
      100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8);
      }
    }
    
    /* Éléments fixes d'UI */
    .logo-top-right {
      position: fixed;
      top: 20px;
      right: 20px;
      height: 50px;
      z-index: 10;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .bg-chooser {
      position: fixed;
      bottom: 20px;
      left: 20px;
      background: rgba(255, 255, 255, 0.95);
      padding: 12px 15px;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
      backdrop-filter: blur(10px);
      font-size: 13px;
    }
    
    .bg-chooser label {
      display: block;
      margin: 4px 0;
      cursor: pointer;
      font-weight: 500;
    }
    
    .bg-chooser input[type="radio"] {
      margin-right: 8px;
    }
    
    .copyright {
      position: fixed;
      bottom: 20px;
      right: 20px;
      font-size: 12px;
      color: #666;
      background: rgba(255, 255, 255, 0.95);
      padding: 8px 12px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      backdrop-filter: blur(10px);
    }
    
    .empty-state {
      text-align: center;
      padding: 30px 20px;
      color: #666;
      font-style: italic;
    }

    /* Responsive design */
    @media (max-width: 480px) {
      body {
        padding: 10px;
      }
      
      .container {
        border-radius: 15px;
      }
      
      .header {
        padding: 25px 15px 15px;
      }
      
      .content {
        padding: 20px 15px;
      }
      
      .stats-container {
        gap: 10px;
      }
      
      .circle {
        width: 70px;
        height: 70px;
      }
      
      .circle-number {
        font-size: 20px;
      }
      
      .btn {
        font-size: 11px; /* Réduit la taille de la police pour petits écrans (au lieu de 13px) */
        padding: 8px 16px; /* Maintient le padding réduit */
        min-width: 80px; /* Réduit encore la largeur minimale pour petits écrans */
      }

      .checkmark-circle {
        width: 100px;
        height: 100px;
      }

      .checkmark-stem {
        height: 25px;
      }

      .checkmark-kick {
        height: 13px;
      }
    }
  
      .button-group {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-bottom: 15px;
        flex-wrap: wrap; /* Permet aux boutons de passer à la ligne sur petits écrans si nécessaire */
     }

      .button-group .btn {
        flex: 1; /* Les boutons partagent l'espace équitablement */
        min-width: 90px; /* Taille minimale pour éviter qu'ils ne deviennent trop petits */
        max-width: 120px; /* Limite la largeur maximale pour une apparence équilibrée */
     }

 /* --- Bluetooth (repris de bleutt.html) --- */
  .bluetooth-status{
    margin-top:10px;padding:10px;border-radius:8px;
    font-size:14px;text-align:center;
  }
  .bluetooth-connected{background:#d4edda;color:#155724;border:1px solid #c3e6cb;}
  .bluetooth-disconnected{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb;}
  .bluetooth-connecting{background:#fff3cd;color:#856404;border:1px solid #ffeaa7;}
  .connection-health{display:flex;align-items:center;gap:10px;margin-top:10px;padding:8px;border-radius:6px;font-size:12px;}
  .health-indicator{width:10px;height:10px;border-radius:50%;background:#dc3545;}
  .health-indicator.good{background:#28a745;}
  .health-indicator.warning{background:#ffc107;}
