/* Prixel Estimation Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.prixel-estimation {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

.prixel-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
}

.prixel-header {
    text-align: center;
    margin-bottom: 40px;
}

.prixel-header h2 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #63a18f, #A16375);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.prixel-header p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.prixel-upload-section {
    margin: 30px 0;
}

.prixel-upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f9f9f9;
}

.prixel-upload-area:hover {
    border-color: #63a18f;
    background: #f0f7f5;
}

/* Styles pour l'interface de résultats */
.prixel-game-result {
    background: #f7f7f7;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(99, 161, 143, 0.1);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #e8f0f0;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.prixel-game-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
}

.prixel-game-image {
    flex: 0 0 200px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prixel-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prixel-no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
}

.prixel-game-info {
    flex: 1;
}

.prixel-game-title h2 {
    margin: 0 0 10px 0;
    color: #63a18f;
    font-size: 28px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.prixel-game-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.prixel-console {
    background: #A16375;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.prixel-confidence {
    color: #666;
    font-size: 14px;
}

.prixel-game-details {
    margin-bottom: 30px;
}

.prixel-pricing-info {
    text-align: center;
}

.prixel-info-grid {
    display: grid;
    gap: 12px;
}

.prixel-info-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.prixel-info-item strong {
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.prixel-price-display {
    text-align: center;
    padding: 25px;
    background: #63a18f;
    border-radius: 12px;
    color: white;
    margin-bottom: 20px;
}

.prixel-price {
    display: block;
    font-size: 2.2em;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.prixel-rarity {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.prixel-rarity.common {
    background: #e9ecef;
    color: #6c757d;
}

.prixel-rarity.rare {
    background: #d4edda;
    color: #155724;
}

.prixel-rarity.epic {
    background: #cce5ff;
    color: #004085;
}

.prixel-rarity.legendary {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #856404;
}

.prixel-game-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.prixel-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.prixel-btn-primary {
    background: #63a18f;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.prixel-btn-primary:hover {
    background: #538f7f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 161, 143, 0.3);
}

.prixel-btn-secondary {
    background: #6c757d;
    color: white;
}

.prixel-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.prixel-btn-outline {
    background: transparent;
    color: #A16375;
    border: 2px solid #A16375;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.prixel-btn-outline:hover {
    background: #A16375;
    color: white;
    transform: translateY(-1px);
}

/* Styles pour l'interface no-match */
.prixel-no-match {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.prixel-no-match-header h2 {
    color: #dc3545;
    margin-bottom: 15px;
}

.prixel-no-match-header p {
    color: #666;
    margin-bottom: 30px;
}

.prixel-detected-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: left;
}

.prixel-detected-info h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.prixel-no-match-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .prixel-game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .prixel-game-image {
        flex: 0 0 150px;
        height: 150px;
    }
    
    .prixel-game-details {
        margin-bottom: 20px;
    }
    
    .prixel-upload-area {
        padding: 30px 20px;
        margin: 20px 0;
        min-height: 200px;
    }
    
    .prixel-upload-icon {
        font-size: 3em;
        margin-bottom: 15px;
    }
    
    .prixel-upload-text {
        font-size: 1em;
    }
    
    .prixel-packaging-selector select {
        font-size: 16px; /* Empêche le zoom iOS */
        padding: 15px;
    }
    
    .prixel-price-display {
        padding: 20px 15px;
    }
    
    .prixel-price {
        font-size: 1.8em;
    }
    
    .prixel-btn {
        padding: 15px 20px;
        font-size: 16px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .prixel-game-actions,
    .prixel-no-match-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .prixel-upload-area {
        padding: 25px 15px;
        min-height: 180px;
    }
    
    .prixel-container {
        padding: 20px 15px;
    }
    
    .prixel-game-result {
        padding: 20px;
        margin: 0 10px;
    }
    
    .prixel-game-image {
        flex: 0 0 120px;
        height: 120px;
    }
    
    .prixel-game-title h2 {
        font-size: 1.5em;
    }
    
    .prixel-price {
        font-size: 1.5em;
    }
    
    .prixel-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Optimisations tactiles mobiles */
@media (hover: none) and (pointer: coarse) {
    .prixel-upload-area {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .prixel-packaging-selector select {
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363a18f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 20px;
        padding-right: 40px;
    }
    
    .prixel-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

.prixel-upload-area.dragover {
    border-color: #63a18f;
    background: #f0f7f5;
    transform: scale(1.02);
}

.prixel-upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.prixel-upload-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}

.prixel-upload-subtext {
    color: #666;
    font-size: 0.9em;
}

.prixel-preview-section {
    margin: 30px 0;
}

.prixel-preview-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.prixel-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prixel-btn {
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 150px;
}

/* Bouton primaire - vert Prixel pour actions principales */
.prixel-btn-primary {
    background: linear-gradient(135deg, #63a18f, #5a907f);
    box-shadow: 0 4px 15px rgba(99, 161, 143, 0.3);
}

.prixel-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 161, 143, 0.4);
    background: linear-gradient(135deg, #5a907f, #528070);
}

/* Bouton secondaire - gris pour actions alternatives */
.prixel-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6269);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.prixel-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
    background: linear-gradient(135deg, #5a6269, #4e555b);
}

/* Bouton outline - vert avec fond transparent */
.prixel-btn-outline {
    background: transparent;
    border: 2px solid #63a18f;
    color: #63a18f;
    box-shadow: 0 4px 15px rgba(99, 161, 143, 0.1);
}

.prixel-btn-outline:hover {
    background: #63a18f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 161, 143, 0.3);
}

.prixel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Notifications modernes */
.prixel-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.prixel-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.prixel-notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.prixel-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prixel-notification-success .prixel-notification-icon {
    color: #63a18f;
}

.prixel-notification-error .prixel-notification-icon {
    color: #dc3545;
}

.prixel-notification-info .prixel-notification-icon {
    color: #6c757d;
}

.prixel-notification-message {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.prixel-notification-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.prixel-notification-close:hover {
    background-color: #f0f0f0;
}

.prixel-notification-action {
    background: #63a18f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.prixel-notification-action:hover {
    background: #5a907f;
}

/* Modale de partage social */
.prixel-share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prixel-share-modal-overlay.show {
    opacity: 1;
}

.prixel-share-modal {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.prixel-share-modal-overlay.show .prixel-share-modal {
    transform: scale(1);
}

.prixel-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.prixel-share-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
}

.prixel-share-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.prixel-share-close:hover {
    background: #f0f0f0;
    color: #666;
}

.prixel-share-content {
    padding: 25px;
}

.prixel-share-preview {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.prixel-share-preview h4 {
    margin: 0 0 10px 0;
    color: #63a18f;
    font-size: 1.2em;
}

.prixel-share-preview p {
    margin: 0;
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

.prixel-share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.prixel-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    color: white;
}

.prixel-share-btn i {
    font-size: 1.5em;
}

.prixel-share-facebook {
    background: #1877f2;
}

.prixel-share-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.prixel-share-twitter {
    background: #1da1f2;
}

.prixel-share-twitter:hover {
    background: #1a91da;
    transform: translateY(-2px);
}

.prixel-share-whatsapp {
    background: #25d366;
}

.prixel-share-whatsapp:hover {
    background: #22c558;
    transform: translateY(-2px);
}

.prixel-share-native {
    background: #63a18f;
}

.prixel-share-native:hover {
    background: #5a907f;
    transform: translateY(-2px);
}

.prixel-share-copy {
    background: #6c757d;
}

.prixel-share-copy:hover {
    background: #5a6269;
    transform: translateY(-2px);
}

/* Responsive pour la modale */
@media (max-width: 768px) {
    .prixel-share-modal {
        width: 95%;
        margin: 10px;
    }
    
    .prixel-share-header {
        padding: 20px 20px 15px;
    }
    
    .prixel-share-content {
        padding: 20px;
    }
    
    .prixel-share-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prixel-share-btn {
        padding: 12px 8px;
        font-size: 0.85em;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .prixel-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.prixel-loading-section {
    margin: 30px 0;
}

.prixel-loading-step {
    padding: 15px;
    margin: 10px 0;
    background: #f0f4ff;
    border-radius: 10px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.prixel-loading-step.active {
    opacity: 1;
    background: #f0f7f5;
    border-left: 4px solid #63a18f;
}

.prixel-manual-section {
    margin: 30px 0;
    text-align: left;
}

.prixel-manual-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.prixel-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.prixel-game-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.prixel-game-card:hover {
    border-color: #63a18f;
    background: #f0f7f5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 161, 143, 0.2);
}

.prixel-game-card.selected {
    border-color: #63a18f;
    background: #f0f7f5;
}

.prixel-game-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.prixel-game-price {
    color: #63a18f;
    font-size: 1.2em;
    font-weight: bold;
}

.prixel-game-rarity {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.prixel-manual-actions {
    text-align: center;
    margin-top: 20px;
}

.prixel-results-section {
    margin: 30px 0;
    text-align: left;
}

.prixel-result-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.prixel-result-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.prixel-result-title {
    flex: 1;
}

.prixel-result-title h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: #333;
}

.prixel-result-price {
    font-size: 2em;
    font-weight: bold;
    color: #63a18f;
    margin-bottom: 10px;
}

.prixel-rarity-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 10px;
}

.prixel-rarity-legendary {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
}

.prixel-rarity-epic {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
}

.prixel-rarity-rare {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
}

.prixel-rarity-common {
    background: linear-gradient(135deg, #10b981, #84cc16);
    color: white;
}

.prixel-confidence-bar {
    background: #f0f0f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.prixel-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #63a18f, #A16375);
    width: 0%;
    transition: width 1s ease;
}

.prixel-result-details {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.prixel-result-actions {
    margin-top: 30px;
    text-align: center;
}

.prixel-action-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

.prixel-action-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.prixel-save-btn:hover {
    background: #10b981;
    color: white;
}

.prixel-share-btn:hover {
    background: #3b82f6;
    color: white;
}

.prixel-new-btn:hover {
    background: #ef4444;
    color: white;
}

.prixel-error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #c33;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prixel-container {
        padding: 20px;
    }
    
    .prixel-header h2 {
        font-size: 2em;
    }
    
    .prixel-result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .prixel-result-image {
        width: 80px;
        height: 80px;
    }
    
    .prixel-game-grid {
        grid-template-columns: 1fr;
    }
    
    .prixel-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .prixel-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Loading Animation */
@keyframes prixel-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.prixel-loading-step.active {
    animation: prixel-pulse 2s infinite;
}

/* Success Animation */
@keyframes prixel-success {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.prixel-results-section {
    animation: prixel-success 0.5s ease-out;
}

/* Style pour le sélecteur de packaging */
.prixel-packaging-selector {
    margin-bottom: 20px;
}

.prixel-packaging-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.prixel-packaging-selector select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prixel-packaging-selector select:hover {
    border-color: #63a18f;
}

.prixel-packaging-selector select:focus {
    outline: none;
    border-color: #63a18f;
    box-shadow: 0 0 0 3px rgba(99, 161, 143, 0.1);
}
