/**
 * DigiKoder Site Importer - Styles
 */

.digikoder-importer-container {
    max-width: 900px;
    margin: 20px 0;
}

.digikoder-importer-step {
    margin-bottom: 30px;
}

/* Zone d'upload */
.upload-zone {
    border: 3px dashed #ccd0d4;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.upload-zone.dragover {
    border-color: #00a32a;
    background: #f0f6fc;
    transform: scale(1.02);
}

.upload-zone-content .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #2271b1;
    margin-bottom: 20px;
}

.upload-zone-content p {
    margin: 10px 0;
    font-size: 16px;
}

.upload-zone-content .description {
    color: #646970;
    font-size: 13px;
}

/* Progression d'upload */
#upload-progress {
    text-align: center;
    padding: 40px;
}

#upload-progress-bar {
    width: 100%;
    height: 30px;
    border-radius: 4px;
    margin-bottom: 15px;
}

#upload-progress-bar::-webkit-progress-bar {
    background-color: #f0f0f1;
    border-radius: 4px;
}

#upload-progress-bar::-webkit-progress-value {
    background: linear-gradient(90deg, #2271b1, #135e96);
    border-radius: 4px;
    transition: width 0.3s ease;
}

#upload-progress-bar::-moz-progress-bar {
    background: linear-gradient(90deg, #2271b1, #135e96);
    border-radius: 4px;
}

#upload-status {
    font-size: 15px;
    color: #50575e;
    font-weight: 500;
}

/* Succès d'upload */
#upload-success {
    text-align: center;
    padding: 30px;
    background: #edfaef;
    border: 2px solid #00a32a;
    border-radius: 6px;
}

.success-message {
    font-size: 18px;
    color: #00a32a;
    font-weight: 600;
    margin-bottom: 20px;
}

.success-message .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

#upload-success p {
    margin: 8px 0;
    font-size: 14px;
}

/* Configuration du site */
.form-table th {
    width: 200px;
    font-weight: 600;
}

.form-table input[type="text"],
.form-table select {
    width: 100%;
    max-width: 500px;
}

#site-url-preview {
    color: #2271b1;
    font-weight: 600;
}

/* Progression d'import */
.import-progress-container {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 6px;
}

#import-progress-bar {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 20px;
}

#import-progress-bar::-webkit-progress-bar {
    background-color: #e0e0e0;
    border-radius: 6px;
}

#import-progress-bar::-webkit-progress-value {
    background: linear-gradient(90deg, #00a32a, #008a20);
    border-radius: 6px;
    transition: width 0.5s ease;
}

#import-progress-bar::-moz-progress-bar {
    background: linear-gradient(90deg, #00a32a, #008a20);
    border-radius: 6px;
}

#import-status {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 20px;
    text-align: center;
}

#import-log {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
}

#import-log p {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #f0f0f1;
}

#import-log p:last-child {
    border-bottom: none;
}

#import-log .timestamp {
    color: #646970;
    font-weight: 600;
    margin-right: 10px;
}

/* Erreur d'import */
#import-error {
    margin-top: 20px;
}

#import-error .notice {
    margin: 0 0 15px 0;
}

/* Succès final */
#step-success .success-message {
    font-size: 24px;
    text-align: center;
    padding: 30px;
    background: #edfaef;
    border-radius: 6px;
    margin-bottom: 30px;
}

#step-success table {
    margin: 20px 0;
}

#step-success th {
    width: 200px;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    background: #f6f7f7;
}

#step-success td {
    padding: 12px;
}

#step-success a {
    font-weight: 600;
}

/* Historique */
#import-history {
    margin-top: 15px;
}

#import-history table {
    margin-top: 15px;
}

#import-history .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

#import-history .button-small {
    padding: 2px 8px;
    height: auto;
    font-size: 12px;
    line-height: 1.5;
}

/* Boutons */
.submit {
    padding-top: 20px;
}

.button + .button {
    margin-left: 10px;
}

/* Cartes */
.card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
    margin: 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.card h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #dcdcde;
    font-size: 20px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .upload-zone {
        padding: 40px 20px;
    }

    .upload-zone-content .dashicons {
        font-size: 48px;
        width: 48px;
        height: 48px;
    }

    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
    }

    .form-table th {
        padding-bottom: 5px;
    }

    .form-table td {
        padding-top: 0;
        padding-bottom: 20px;
    }

    #step-success th,
    #step-success td {
        display: block;
        width: 100%;
    }

    .button + .button {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.import-progress-container {
    animation: pulse 2s ease-in-out infinite;
}

#import-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}
