/* Scanner de Factures - Styles personnalisés */

.scanner-main {
    min-height: 100vh;
    padding-top: 100px;
}

.scanner-hero {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.scanner-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.scanner-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
}

.scanner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Zone de téléchargement */
.upload-zone {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 3px dashed rgba(138, 99, 210, 0.5);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 30px;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #8a63d2;
    background: rgba(138, 99, 210, 0.1);
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upload-icon {
    font-size: 5rem;
    color: #8a63d2;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.upload-zone h3 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 600;
}

.upload-zone p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.file-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Section prévisualisation */
.preview-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.4rem;
}

.preview-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    max-height: 600px;
    overflow: auto;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 550px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Barre de progression */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8a63d2, #e91e63);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

.btn-scan {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
}

/* Section résultats */
.results-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.4rem;
}

.results-actions {
    display: flex;
    gap: 10px;
}

/* Grille de données */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.data-field {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.data-field:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.data-field label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.data-field input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.data-field input:focus {
    outline: none;
    border-color: #8a63d2;
    background: rgba(0, 0, 0, 0.4);
}

.data-field input:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Actions d'export */
.export-actions {
    background: rgba(138, 99, 210, 0.1);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(138, 99, 210, 0.3);
}

.export-actions h4 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #fff;
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn-export {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-excel {
    background: linear-gradient(135deg, #217346, #2b9348);
    color: white;
}

.btn-excel:hover {
    background: linear-gradient(135deg, #2b9348, #217346);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(33, 115, 70, 0.4);
}

.btn-dbf {
    background: linear-gradient(135deg, #d35400, #e67e22);
    color: white;
}

.btn-dbf:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(211, 84, 0, 0.4);
}

.btn-json {
    background: linear-gradient(135deg, #6c3483, #8e44ad);
    color: white;
}

.btn-json:hover {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 52, 131, 0.4);
}

/* Section texte brut */
.raw-text-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.raw-text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.raw-text-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.4rem;
}

.raw-text-content textarea {
    width: 100%;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 15px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}

/* Section d'information */
.info-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(138, 99, 210, 0.5);
}

.info-icon {
    font-size: 3rem;
    color: #8a63d2;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Boutons secondaires petits */
.btn-secondary-sm {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-sm:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .scanner-hero h1 {
        font-size: 2.5rem;
    }

    .scanner-hero p {
        font-size: 1rem;
    }

    .upload-zone {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3.5rem;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }

    .export-buttons {
        grid-template-columns: 1fr;
    }

    .results-header,
    .preview-header,
    .raw-text-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions button {
        flex: 1;
    }
}

/* Animation pour les éléments qui apparaissent */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-section,
.results-section,
.raw-text-section {
    animation: slideInUp 0.5s ease;
}