/* --- GLOBAL --- */
body { 
    font-family: 'Poppins', sans-serif; 
    background-color: #f8fafc; /* Slate-50 equivalent */
    -webkit-tap-highlight-color: transparent; 
}

/* --- ANIMATIONS --- */
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.animate-fade-in { 
    animation: fadeIn 0.3s ease-out forwards; 
}

/* --- CARDS --- */
.card-item { 
    transition: all 0.2s ease; 
    position: relative; 
}
.card-item:active { 
    transform: scale(0.98); 
}

/* Missing Card State (Grayed out) */
.card-missing img { 
    filter: grayscale(100%) opacity(0.6); 
    transition: all 0.3s; 
}
.card-missing:hover img { 
    filter: grayscale(0%) opacity(0.9); 
    transform: scale(1.02); 
    cursor: pointer; 
}

/* Owned Card State (Red Border) */
.card-owned { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
}
.card-owned img { 
    filter: grayscale(0%); 
}
.card-owned::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    border-radius: 0.75rem; 
    border: 2px solid #dc2626; /* Red-600 */
    pointer-events: none; 
}

/* Wishlist Card State (Orange Dashed Border) */
.card-wishlist { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.2); 
}
.card-wishlist img { 
    filter: grayscale(0%); 
    opacity: 0.9; 
}
.card-wishlist::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    border-radius: 0.75rem; 
    border: 2px dashed #f59e0b; /* Amber-500 */
    pointer-events: none; 
}

/* --- BADGES --- */
.status-badge { 
    position: absolute; 
    top: 0.5rem; 
    right: 0.5rem; 
    padding: 0.2rem 0.4rem; 
    border-radius: 0.3rem; 
    font-size: 0.6rem; 
    font-weight: 800; 
    color: white; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
    z-index: 10; 
    letter-spacing: 0.05em; 
}

/* Status Colors */
.st-sell { background-color: #1e293b; } /* Slate-800 (Dark for Sale) */
.st-trade { background-color: #dc2626; } /* Red-600 (Red for Trade) */
.st-wish { background-color: #f59e0b; } /* Amber-500 (Orange for Wishlist) */

/* Count Badge (Red Circle) */
.count-badge { 
    position: absolute; 
    top: -6px; 
    right: -6px; 
    background: #dc2626; /* Red-600 */
    color: white; 
    font-weight: bold; 
    font-size: 0.75rem; 
    min-width: 1.4rem; 
    height: 1.4rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 99px; 
    border: 2px solid white; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
    z-index: 20; 
    padding: 0 4px; 
}

/* --- FORMS & TOGGLES --- */
.toggle-checkbox:checked { 
    right: 0; 
    border-color: #dc2626; /* Red-600 */
}
.toggle-checkbox:checked + .toggle-label { 
    background-color: #dc2626; /* Red-600 */
}

/* Error Messages */
.error-msg { 
    color: #dc2626; /* Red-600 */
    font-size: 0.75rem; 
    margin-top: 0.25rem; 
    font-weight: 500; 
}

/* --- ICONS --- */
.heart-icon { 
    transition: transform 0.2s; 
}
.heart-icon:active { 
    transform: scale(1.3); 
}
.is-fav { 
    fill: #dc2626; /* Red-600 */
    color: #dc2626; 
}

/* --- CHAT BUBBLES --- */
.msg-bubble { 
    max-width: 75%; 
    padding: 0.75rem 1rem; 
    border-radius: 1rem; 
    font-size: 0.9rem; 
    line-height: 1.4; 
    position: relative; 
}

/* My messages (Red, right aligned) */
.msg-me { 
    background-color: #dc2626; /* Red-600 */
    color: white; 
    margin-left: auto; 
    border-bottom-right-radius: 0.25rem; 
}

/* Other messages (White/Dark text, left aligned) */
.msg-other { 
    background-color: white; 
    color: #1e293b; /* Slate-800 */
    border: 1px solid #e2e8f0; 
    border-bottom-left-radius: 0.25rem; 
}

/* --- UTILS --- */
/* Used for pie charts if needed later */
.pie-chart { 
    background: conic-gradient(var(--c1) var(--p1), var(--c2) 0 var(--p2), var(--c3) 0 var(--p3), #e2e8f0 0); 
    border-radius: 50%; 
}

/* --- Polices & Général --- */
body {
    font-family: 'Poppins', sans-serif;
}

/* --- Animations --- */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

.binder-page {
    background-color: #f1f5f9; /* Fond légèrement plus gris pour simuler le fond du classeur */
    border: 4px solid #cbd5e1; /* Bordure épaissie pour le contour de la page */
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    display: grid;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.binder-mode .card-item {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.binder-mode .card-item h4 {
    font-size: 18px !important; 
    font-weight: 900;  
    color: #0f172a;    
}

.binder-mode .card-item span.uppercase {
    font-size: 14px !important; 
    font-weight: 800;
    letter-spacing: 0.025em;  
}

.binder-mode .card-item:hover {
    transform: scale(1.05); 
    z-index: 20;
}

input[readonly] {
  background-color: #e9ecef; 
  color: #6c757d;            
  cursor: not-allowed;    
  opacity: 1;
}

[x-cloak] { display: none !important; }

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* 1. Variables Globales (Couleurs Tailwind) */
:root {
    --uppy-primary: #2563eb; /* blue-600 */
    --uppy-primary-hover: #1d4ed8; /* blue-700 */
    --uppy-text-main: #0f172a; /* slate-900 */
    --uppy-text-secondary: #64748b; /* slate-500 */
    --uppy-bg-gray: #f8fafc; /* slate-50 */
}

/* 2. La Modale (Dashboard) */
.uppy-Dashboard-inner {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important; /* slate-200 */
    border-radius: 1.5rem !important; /* rounded-3xl */
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
}

.uppy-Dashboard-overlay {
    background-color: rgba(15, 23, 42, 0.8) !important; /* slate-900 avec opacité */
    backdrop-filter: blur(4px);
}

/* Header de la modale */
.uppy-DashboardContent-bar {
    border-bottom: 1px solid #e2e8f0 !important;
    background: white !important;
    color: var(--uppy-text-main) !important;
    z-index: 100;
}

.uppy-DashboardContent-title {
    font-weight: 800 !important;
    color: var(--uppy-text-main) !important;
    font-size: 1.1rem !important;
}

/* Zone de Drop (quand vide) */
.uppy-Dashboard-AddFiles {
    border: 2px dashed #cbd5e1 !important; /* slate-300 */
    margin: 20px !important;
    border-radius: 1rem !important; /* rounded-2xl */
    background-color: #f8fafc !important; /* slate-50 */
}

.uppy-Dashboard-AddFiles-title {
    font-weight: 700 !important;
    color: var(--uppy-text-secondary) !important;
}

/* 3. Bouton "Valider cette photo" (Le plus important) */
.uppy-StatusBar-actionBtn--upload {
    background-color: #dc2626 !important; /* red-600 (Ta couleur principale) */
    color: white !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    padding: 10px 24px !important;
    border-radius: 0.75rem !important; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3) !important;
    transition: all 0.2s !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.uppy-StatusBar-actionBtn--upload:hover {
    background-color: #b91c1c !important; /* red-700 */
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3) !important;
}

/* Barre de statut en bas */
.uppy-StatusBar {
    border-top: 1px solid #e2e8f0 !important;
    background: white !important;
    z-index: 100 !important;
}

/* 4. L'Éditeur d'Image (Crop) */
.uppy-ImageCropper {
    background: #0f172a !important; /* slate-900 pour bien voir l'image */
}

/* Les boutons de l'éditeur (Rotation, Zoom, etc.) */
.uppy-ImageCropper-controls {
    background-color: white !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 15px !important;
}

.uppy-c-btn {
    border-radius: 0.75rem !important; /* rounded-xl */
    font-weight: 700 !important;
    transition: all 0.2s !important;
}

/* Boutons d'outils (Rotation, etc) */
.uppy-ImageCropper-controls .uppy-c-btn {
    color: var(--uppy-text-secondary) !important;
    background-color: #f1f5f9 !important; /* slate-100 */
    margin: 0 4px !important;
}

.uppy-ImageCropper-controls .uppy-c-btn:hover {
    background-color: #dbeafe !important; /* blue-100 */
    color: #2563eb !important; /* blue-600 */
}

/* Bouton "Save" dans l'éditeur */
.uppy-ImageCropper-controls .uppy-c-btn-primary {
    background-color: #2563eb !important; /* blue-600 */
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3) !important;
}

/* 5. Bouton "Done" (Terminé) après upload */
.uppy-StatusBar-actionBtn--done {
    background-color: #16a34a !important; /* green-600 */
    border-radius: 0.75rem !important;
    font-weight: 800 !important;
}

/* Typographie globale */
.uppy-Root {
    font-family: inherit !important; /* Utilise ta police (Inter ?) */
}