/* ====================================
   STYLES FRONTEND - LOT TRACKER (VERSION SIMPLE)
   ==================================== */

/* Version simple et minimaliste */
.lot-search-simple {
    max-width: 600px;
    margin: 30px auto;
    padding: 0;
    background: transparent;
}

.lot-search-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

/* Formulaire */
.lot-search-form {
    margin-bottom: 20px;
    background: transparent;
}

.lot-form-group {
    margin-bottom: 15px;
}

.lot-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.lot-form-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.lot-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.lot-search-btn {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #ffc107;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lot-search-btn:hover {
    background: #e0a800;
}

/* Loading */
.search-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Erreurs */
.search-error {
    background: #fef0f0;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.error-message {
    color: #dc3232;
    margin: 0;
}

/* Résultats */
.search-results {
    margin-top: 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.results-header h3 {
    font-size: 20px;
    color: #0a7a0a;
    margin: 10px 0 0 0;
}

.success-icon {
    font-size: 36px;
    display: block;
}

/* Grille de résultats */
.results-grid {
    display: grid;
    gap: 15px;
}

/* Card de résultat */
.result-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.result-card-header {
    background: #fff;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.result-card-header h4 {
    font-size: 18px;
    margin: 0 0 8px 0;
}

.lot-badge {
    display: inline-block;
    background: #e8f4f8;
    color: #0073aa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.result-card-body {
    padding: 15px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.file-date {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Actions */
.result-card-actions {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.action-button {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.view-button {
    background: #e8f4f8;
    color: #0073aa;
    border-color: #0073aa;
}

.view-button:hover {
    background: #0073aa;
    color: #fff;
}

.download-button {
    background: #0a7a0a;
    color: #fff;
}

.download-button:hover {
    background: #006600;
}

/* ====================================
   MODAL PDF VIEWER
   ==================================== */

.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pdf-modal.active {
    opacity: 1;
    visibility: visible;
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.pdf-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pdf-modal.active .pdf-modal-content {
    transform: scale(1);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
}

.pdf-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.pdf-modal-header .dashicons {
    color: #0073aa;
    font-size: 20px;
}

.pdf-modal-close {
    background: #dc3232;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pdf-modal-close:hover {
    background: #a00;
}

.pdf-modal-close .dashicons {
    font-size: 18px;
    color: #ffffff;
}

.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    background: #f5f5f5;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
}

.pdf-download-btn,
.pdf-newtab-btn {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.pdf-download-btn {
    background: #0a7a0a;
    color: #ffffff;
}

.pdf-download-btn:hover {
    background: #006600;
}

.pdf-newtab-btn {
    background: #0073aa;
    color: #ffffff;
}

.pdf-newtab-btn:hover {
    background: #005177;
}

.pdf-download-btn .dashicons,
.pdf-newtab-btn .dashicons {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .lot-search-simple {
        padding: 0 15px;
    }
    
    .result-card-actions {
        flex-direction: column;
    }
    
    .pdf-modal-content {
        width: 95%;
        height: 95vh;
    }
    
    .pdf-modal-footer {
        flex-direction: column;
    }
}

/* Supprimer les anciens styles */
.lot-search-container,
.lot-search-card,
.lot-search-header,
.lot-search-subtitle,
.search-input-wrapper,
.search-label,
.search-button,
.input-hint,
.lot-search-help,
.help-steps,
.help-note,
.loading-spinner,
.error-icon,
.button-icon,
.button-text,
.product-icon,
.product-info,
.file-details,
.note-icon,
.help-icon {
    /* Styles désactivés */
}

/* ====================================
   MODAL PDF VIEWER
   ==================================== */

.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pdf-modal.active {
    opacity: 1;
    visibility: visible;
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.pdf-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pdf-modal.active .pdf-modal-content {
    transform: scale(1);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 12px 12px 0 0;
}

.pdf-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.pdf-modal-header .dashicons {
    color: #2271b1;
    font-size: 24px;
}

.pdf-modal-close {
    background: #d63638;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pdf-modal-close:hover {
    background: #b32d2e;
    transform: rotate(90deg);
}

.pdf-modal-close .dashicons {
    font-size: 20px;
    color: #ffffff;
}

.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    background: #f5f5f5;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 25px;
    background: #f9f9f9;
    border-top: 2px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
}

.pdf-download-btn,
.pdf-newtab-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pdf-download-btn {
    background: #00a32a;
    color: #ffffff;
}

.pdf-download-btn:hover {
    background: #008a20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 163, 42, 0.3);
}

.pdf-newtab-btn {
    background: #2271b1;
    color: #ffffff;
}

.pdf-newtab-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.pdf-download-btn .dashicons,
.pdf-newtab-btn .dashicons {
    font-size: 18px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .pdf-modal-content {
        width: 95%;
        height: 95vh;
    }
    
    .pdf-modal-header {
        padding: 15px;
    }
    
    .pdf-modal-header h3 {
        font-size: 14px;
    }
    
    .pdf-modal-footer {
        flex-direction: column;
        padding: 12px 15px;
    }
    
    .pdf-download-btn,
    .pdf-newtab-btn {
        width: 100%;
    }
}
