/* Styles de l'interface utilisateur pour le PDF merger */

/* Variables CSS */
:root {
    --pdf-primary: #e74c3c;
    --pdf-primary-dark: #c0392b;
    --pdf-secondary: #34495e;
    --pdf-success: #27ae60;
    --pdf-warning: #f39c12;
    --pdf-danger: #e74c3c;
    --pdf-info: #3498db;
    
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(52, 73, 94, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container principal */
.pdf-merger-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    padding-bottom: 1.5rem;
}

.pdf-merger-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* En-tête héro */
.hero.is-primary .title,
.hero.is-primary .subtitle {
    color: white !important;
}

/* Layout par défaut - MOBILE FIRST */
.pdf-main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pdf-with-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    order: 1;
}

.pdf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    order: 2;
}

/* Layout DESKTOP */
@media screen and (min-width: 1024px) {
    .pdf-main-content {
        display: grid !important;
        grid-template-columns: 1fr 300px !important;
        gap: 1.5rem !important;
        align-items: start !important;
    }
    
    .pdf-with-upload {
        grid-column: 1 !important;
        order: unset !important;
    }
    
    .pdf-sidebar {
        grid-column: 2 !important;
        order: unset !important;
    }
}

.upload-sidebar,
.instructions-sidebar {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-sm);
}

/* Panneau de contrôle */
.control-panel {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.merge-options {
    border-top: 1px solid #ecf0f1;
    padding-top: 1rem;
}

/* Zone de corbeille */
.trash-zone {
    background-color: #ffe6e6;
    border: 2px dashed #ff6b6b;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trash-zone:hover {
    background-color: #ffcccc;
    border-color: #ff4757;
}

.trash-zone.drag-over {
    background-color: #ffb3b3;
    border-color: #e74c3c;
    transform: scale(1.02);
}

/* Progression de fusion */
.merge-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
}

.merge-progress-content {
    text-align: center;
}

/* Boutons */
.button.is-medium {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Notifications */
.notification.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.notification.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.notification.info {
    background-color: #cce7ff;
    border-color: #b3d9ff;
    color: #004085;
}

/* Liste des fichiers PDF */
.pdf-list-board {
    border: 1.5px solid var(--glass-border);
    border-radius: var(--border-radius);
    background: var(--glass-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    transition: var(--transition);
}

.pdf-list-board:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Styles pour les états de drag & drop */
.pdf-files-list.drag-over {
    background: rgba(231, 76, 60, 0.05);
    border: 2px dashed #e74c3c;
    border-radius: 8px;
}

/* Instructions */
.instruction-content ol {
    margin-left: 1rem;
}

.instruction-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-file-item {
    animation: fadeInUp 0.3s ease;
}

/* Responsive pour les boutons */
@media screen and (max-width: 768px) {
    .control-panel .columns {
        margin: 0;
    }
    
    .control-panel .column {
        padding: 0.5rem;
    }
    
    .field.is-grouped {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .button.is-medium {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}
