﻿/* ========================================
   FlipIQ - Scan Page CSS
   Version Complète & Corrigée
   ======================================== */

/* === CSS Variables / Design System === */
:root {
  /* Primary Colors */
  --primary-purple: #7C3AED;
  --primary-purple-hover: #6D28D9;
  --primary-purple-light: #A78BFA;
  --purple-bg-gradient: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 50%, #C4B5FD 100%);

  /* Neutrals */
  --dark-charcoal: #1F2937;
  --medium-gray: #6B7280;
  --light-gray: #F3F4F6;
  --border-gray: #E5E7EB;
  --white: #FFFFFF;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* === Reset & Base Styles === */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--light-gray);
  color: var(--dark-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Main Content === */
.scan-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
  position: relative;
}

/* === Search Bar === */
.search-container {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.search-input {
  width: 100%;
  padding: 16px 48px 16px 20px;
  font-size: 16px;
  font-family: var(--font-sans);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-xl);
  background-color: var(--white);
  color: var(--dark-charcoal);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-input::placeholder {
  color: var(--medium-gray);
}

.search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--medium-gray);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: var(--primary-purple);
}

/* === State Management === */
.scan-state {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   BEFORE SCAN STATE
   ======================================== */

/* === Upload Section === */
.upload-section {
  margin-bottom: 60px;
}

/* --- IMPORTANT: Position relative pour le FAB --- */
.upload-dropzone {
  position: relative; /* Point d'ancrage pour le bouton FAB */
  background-color: var(--light-gray);
  border: 2px dashed var(--border-gray);
  border-radius: var(--radius-lg);
  padding: 80px 40px;
  display: flex; /* Centrage du contenu */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 250px;
  overflow: visible; /* Important pour que l'ombre du bouton ne soit pas coupée */
}

.upload-dropzone:hover {
  border-color: var(--primary-purple);
  background-color: #FAFAFB;
}

.upload-dropzone.drag-active {
  border-color: var(--primary-purple);
  background-color: #EDE9FE;
}

.camera-icon {
  color: var(--medium-gray);
  margin: 0 auto 20px;
  display: block;
}

.upload-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-charcoal);
  margin: 0;
}

/* === FAB Button (Bouton Flottant Violet) === */
.fab-button {
  /* Positionnement Absolu (Fixe en bas à droite de la dropzone) */
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;

  /* Styles visuels */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #7c3aed !important; /* Force le violet */
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transition: all 0.3s ease;
}

.fab-button:hover {
  background-color: #6d28d9 !important;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.fab-button:active {
  transform: scale(0.95);
}

/* Animation de chargement FAB */
.fab-button.is-loading {
  background-color: #7c3aed !important;
  pointer-events: none;
  opacity: 0.9;
}

.fab-button .icon-spinner {
  display: none;
}

.fab-button.is-loading .icon-plus {
  display: none;
}

.fab-button.is-loading .icon-spinner {
  display: block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Thumbnails Section (Miniatures) === */
#thumbs.thumbs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  /* Changement ici : Marge en bas car c'est au dessus de la dropzone maintenant */
  margin-bottom: 20px; 
  padding: 0; /* On retire le padding interne pour que ça s'aligne proprement */
  background-color: transparent; /* Pas de fond gris, plus propre */
  border: none;
}

/* Style de la vignette */
.attachment-thumb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden; /* Coupe ce qui dépasse */
  background-color: #e5e7eb; /* Fond gris le temps que l'image charge */
  border: 1px solid #e5e7eb;
  /* FLEXBOX retiré ici pour éviter les conflits de taille */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* CORRECTION BUG IMAGE BLANCHE */
.attachment-thumb img {
  position: absolute; /* Force l'image à se placer par dessus tout */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Remplit le carré sans déformer */
  display: block;
  z-index: 1; /* S'assure qu'elle est visible */
}

.remove-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5); /* Fond sombre semi-transparent */
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2; /* Au dessus de l'image */
  transition: background 0.2s;
}

.remove-thumb:hover {
  background-color: #ef4444; /* Rouge au survol */
}

/* Bouton "+" carré */
.add-more-btn {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background-color: #fff;
  border: 2px dashed #d1d5db;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.add-more-btn:hover {
  border-color: #7c3aed;
  color: #7c3aed;
  background-color: #f9f7ff;
}

/* Bouton "+" carré pour ajouter plus de photos */
.add-more-btn {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background-color: #fff;
  border: 2px dashed #d1d5db;
  color: #9ca3af;
  font-size: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.add-more-btn:hover {
  border-color: #7c3aed;
  color: #7c3aed;
  background-color: #f9f7ff;
  transform: scale(1.02);
}

/* === History Section === */
.history-section {
  margin-top: 60px;
}

.history-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-charcoal);
  margin-bottom: 24px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  background-color: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.history-item:hover {
  border-color: var(--primary-purple);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.history-thumbnail {
  width: 64px;
  height: 64px;
  background-color: var(--light-gray);
  border: 2px solid var(--border-gray);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--medium-gray);
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-charcoal);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: 13px;
  color: var(--medium-gray);
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--medium-gray);
  background-color: var(--light-gray);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.action-btn:hover {
  background-color: var(--border-gray);
  color: var(--dark-charcoal);
}

.history-empty {
  text-align: center;
  color: var(--medium-gray);
  font-style: italic;
  margin-top: 20px;
}

/* ========================================
   AFTER SCAN STATE (Results)
   ======================================== */

.result-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: 20px;
}

.result-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.result-card:hover {
  border-color: #7C3AED;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1);
}

.result-card:active {
  transform: scale(0.98);
  background-color: #F3F4F6;
}

.title-card { grid-column: 1; grid-row: 1; }
.price-card { grid-column: 1; grid-row: 2; }
.desc-card { grid-column: 2; grid-row: 1 / span 2; }

.card-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  margin-bottom: 10px;
  font-weight: 600;
}

.card-content {
  font-size: 1.1rem;
  color: #1F2937;
  font-weight: 500;
  line-height: 1.5;
}

.price-large {
  font-size: 2rem;
  font-weight: 800;
  color: #7C3AED;
}

.scrollable {
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.copy-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  opacity: 0.3;
  font-size: 1.2rem;
}

.result-card:hover .copy-icon { opacity: 1; }

.btn-text {
  background: none;
  border: none;
  color: #6B7280;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* === Comparison Section === */
.comparison-section {
  margin-top: 60px;
  padding: 40px 0;
}

/* === Pro Badge === */
.pro-badge {
  position: fixed;
  top: 100px;
  right: 24px;
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-hover));
  color: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

/* ========================================
   MODALS & TOASTS
   ======================================== */

.condition-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.condition-modal[aria-hidden="false"] {
  display: flex !important;
}

.condition-dialog {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

/* === MODAL CHOIX (Condition) === */

/* Conteneur : On force 4 colonnes égales */
.condition-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonnes de même taille */
  gap: 12px;
  margin: 24px 0;
  width: 100%;
}

/* Les Boutons de choix */
.condition-choices .btn-choice {
  width: 100%;
  min-width: 0; /* Important pour éviter que le texte ne casse la grille */
  padding: 12px 4px; /* Padding réduit sur les côtés pour que le texte rentre */
  
  /* Style par défaut (Non sélectionné) */
  background-color: #fff;
  border: 1px solid #e5e7eb; /* Bordure grise légère */
  color: var(--dark-charcoal);
  border-radius: 12px; /* Arrondi cohérent avec le reste */
  
  /* Typographie */
  font-family: var(--font-sans);
  font-size: 13px; /* Un peu plus petit pour tenir sur une ligne */
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Au survol (Hover) */
.condition-choices .btn-choice:hover {
  border-color: var(--primary-purple);
  color: var(--primary-purple);
  background-color: #f9f7ff; /* Violet très pâle */
}

/* État SÉLECTIONNÉ (Active) - Comme le bouton Valider */
.condition-choices .btn-choice.is-active {
  background-color: var(--primary-purple) !important;
  color: #fff !important;
  border-color: var(--primary-purple) !important;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
  font-weight: 600;
}

/* Responsive Mobile : Si l'écran est vraiment trop petit, on passe sur 2 lignes */
@media (max-width: 480px) {
  .condition-choices {
    grid-template-columns: repeat(2, 1fr); /* 2 par ligne sur petit mobile */
  }
}

.btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn:hover { background: var(--light-gray); }

.btn-primary {
  background: var(--primary-purple);
  color: #fff;
  border: none;
}
.btn-primary:hover { background: var(--primary-purple-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.sell-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 2000;
}

.sell-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.sell-toast.success { background: #10b981; }
.sell-toast.error { background: #ef4444; }
.sell-toast.warn { background: #f59e0b; color: #000; }

/* Settings Panel (Hidden by default) */
.settings-panel {
  display: none;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .scan-page { padding: 0 16px; margin: 24px auto; }
  
  .upload-dropzone { padding: 60px 20px; }
  
  /* Ajustement FAB mobile */
  .fab-button {
    width: 50px; height: 50px;
    bottom: 16px; right: 16px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
  .desc-card {
    grid-column: 1;
    grid-row: auto;
    order: 3;
  }
  
  .history-item { padding: 16px; }
  .history-thumbnail { width: 56px; height: 56px; }
}

@media (max-width: 480px) {
  .search-input { font-size: 14px; padding: 14px 40px 14px 16px; }
  .upload-dropzone { padding: 40px 16px; }
}

/* Rend la zone de drop cliquable visuellement */
.upload-dropzone {
  cursor: pointer; /* Indique à l'utilisateur que c'est cliquable */
}

/* Arrondir les images de l'historique */
.history-item .h-img {
  border-radius: 8px; /* Arrondi des bords */
  overflow: hidden;   /* Assure que l'image ne dépasse pas */
}

.history-item .h-img img {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* overlay de chargement sur les vignettes pendant la génération */
.attachment-thumb {
  position: relative;
  overflow: hidden;
}

.attachment-thumb .thumb-loader {
  position: absolute;
  inset: 0; /* top/right/bottom/left: 0 */
  background-image: url('/img/animation.gif');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover; /* prend toute la largeur/hauteur */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.attachment-thumb.is-loading .thumb-loader {
  opacity: 1;
}


/* details-modal.css */
.details-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.details-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.details-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.details-dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.details-modal.is-visible .details-dialog {
  transform: translateY(0);
}

.details-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.details-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: #1e293b; }
.details-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; }

.details-body {
  padding: 24px;
  overflow-y: auto;
}

.details-intro { margin-top: 0; color: #64748b; font-size: 0.9rem; margin-bottom: 20px; }

/* Champs du formulaire */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: #475569; margin-bottom: 6px; }

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: #7c3aed;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Style "À vérifier" (Confidence < 0.8) */
.form-group.to-verify .form-input, 
.form-group.to-verify .form-select {
  border-color: #f59e0b; /* Orange warning */
  background-color: #fffbeb;
}

.verify-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: #fef3c7;
  color: #d97706;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
}

.details-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}


/* details-modal.css */
.details-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.details-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.details-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.details-dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.details-modal.is-visible .details-dialog {
  transform: scale(1);
}

.details-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.details-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: #0f172a; }
.details-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; padding: 0 8px; }

.details-body {
  padding: 24px;
  overflow-y: auto;
}

.details-intro { margin-top: 0; color: #64748b; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

/* Champs du formulaire */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: #475569; margin-bottom: 6px; }

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: #7c3aed;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Style "À vérifier" (Confidence < 0.8) */
.form-group.to-verify .form-input, 
.form-group.to-verify .form-select {
  border-color: #f59e0b; /* Orange warning */
  background-color: #fffbeb;
}

.verify-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: #fef3c7;
  color: #d97706;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}

.details-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}



/* Style pour les boutons de type disque dur */
.storage-options {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  /* Caché par défaut tant qu'on n'a pas choisi la taille */
  display: none; 
}
.storage-options.is-visible {
  display: flex;
}

.type-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.type-btn.active {
  background: #7c3aed; /* Votre couleur violette */
  color: white;
  border-color: #7c3aed;
}